@warren-bank/dapp-frontend
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -6,2 +6,3 @@ #! /usr/bin/env node | ||
const init_toolchain_react = require('./create-react-dapp') | ||
const init_toolchain_ng2 = require('./create-ng2-dapp') | ||
@@ -13,2 +14,6 @@ yargs.usage("$0 command <directory_path>") | ||
}) | ||
.command("ng2 [path]", "initialize toolchain: 'Angular 2'", () => {}, (argv) => { | ||
var directory_path = (argv.path)? argv.path : process.cwd() | ||
init_toolchain_ng2(directory_path) | ||
}) | ||
.command('*', false, () => {}, (argv) => { | ||
@@ -15,0 +20,0 @@ console.log('[ERROR]: unrecognized command. Please choose an available toolchain.') |
{ | ||
"name": "@warren-bank/dapp-frontend", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"dependencies": { | ||
@@ -11,3 +11,4 @@ "npm-add-script": "^1.1.0", | ||
"dapp-frontend": "bin/dapp-frontend.js", | ||
"create-react-dapp": "bin/create-react-dapp.js" | ||
"create-react-dapp": "bin/create-react-dapp.js", | ||
"create-ng2-dapp": "bin/create-ng2-dapp.js" | ||
}, | ||
@@ -14,0 +15,0 @@ "license": "GPL-2.0", |
@@ -7,3 +7,3 @@ ### [dapp-frontend](https://github.com/warren-bank/dapp-frontend) | ||
Eventually, several toolchains will be available from which to select. | ||
Eventually, several toolchains will be available from which to select.<br> | ||
Currently, the following are implemented: | ||
@@ -14,2 +14,6 @@ * `react` | ||
* http server (localhost:3000) | ||
* `ng2` | ||
* Angular 2 + Sass + Webpack | ||
* file watchers that trigger Webpack to rebundle .js and .css | ||
* http server (localhost:3000) | ||
@@ -27,2 +31,4 @@ Within each toolchain, the example Dapp is a rewrite of the [`MetaCoin` Dapp](https://github.com/trufflesuite/truffle-init-webpack) that's used as an example (boilerplate) by `Truffle`. | ||
npm install -g node-sass | ||
# no additional global dependencies are needed to initialize the `ng2` toolchain | ||
``` | ||
@@ -93,2 +99,9 @@ | ||
#### Notes (regarding the previous **Example**): | ||
* the example was intended to illustrate the general procedure to initialize a new project using the "React" toolchain | ||
* the procedure to initialize the "Angular 2" toolchain is nearly identical. | ||
* in this case, however, the file watcher for SASS (.scss) stylesheets is started along with the other watchers (.js, .css) when `npm start` is run | ||
* no separate command (ex: `npm run watch-css`) is needed to do so | ||
#### Usage: | ||
@@ -103,2 +116,3 @@ | ||
react initialize toolchain: 'React' | ||
ng2 initialize toolchain: 'Angular 2' | ||
@@ -127,6 +141,5 @@ Options: | ||
* As indicated in the `Install` instructions,<br> | ||
a prerequisite is that some external tools need to be installed globally. | ||
* These are large (powerful) packages, where there's no need to download a duplicate copy. | ||
* The one exception is [`dapp-deploy`](https://github.com/warren-bank/dapp-deploy), which is a very small package that is intended to be used in combination with this tool. Strictly speaking, it can be omitted and the data structures it serves to produce (.deployed.json) can be written by hand. | ||
* As indicated in the **Install** instructions,<br> | ||
some toolchains may require additional global dependencies | ||
* note: this may change.. | ||
@@ -138,3 +151,4 @@ #### Executables: | ||
* Additionally, each toolchain can be invoked directly: | ||
* `react`:<br>`create-react-dapp <directory_path>` | ||
* "React":<br>`create-react-dapp <directory_path>` | ||
* "Angular 2":<br>`create-ng2-dapp <directory_path>` | ||
@@ -141,0 +155,0 @@ #### Legal: |
91531
41
822
152
2