Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,7 @@ typings/
.env

# Ignore distribution directory
dist/
dist/

# Ignore build www directories
www/
18 changes: 18 additions & 0 deletions packages/fast-react-components-base/app/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from "react";
import ReactDOM from "react-dom";

/**
* Create the root node
*/
const root: HTMLElement = document.createElement("div");
root.setAttribute("id", "root");
document.body.appendChild(root);

function render(): void {
ReactDOM.render(
<h1>Hello world</h1>,
root
);
}

render();
27 changes: 27 additions & 0 deletions packages/fast-react-components-base/build/clean.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Utility for cleaning directories.
* Usage: node build/clean.js %path%
*/
const rimraf = require("rimraf");
const argv = require("yargs").argv;

/**
* All paths passed to the clean script
*/
const paths = argv._;

/**
* Function to remove a given path
*/
function cleanPath(path) {
rimraf(path, () => {
console.log(`${path} cleaned`);
});
}

/**
* Clean all paths
*/
if (Array.isArray(paths)) {
paths.forEach(cleanPath);
}
Loading