Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make one package.json for Kitchensink example (#176)
one package.json per examples with its one webpack config
- Loading branch information
1 parent
c4dd810
commit a87fd6e
Showing
36 changed files
with
424 additions
and
266 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"presets": [ | ||
"travix" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
PORT=5001 | ||
|
||
bundle-vendor: | ||
(cd vendors && ../node_modules/.bin/webpack) | ||
|
||
bundle: | ||
(cd ./core && npm run build) | ||
npm run build | ||
|
||
serve: | ||
make bundle-vendor | ||
make bundle | ||
(cd ./build && ../../../node_modules/.bin/http-server -p $(PORT)) | ||
(cd ./build && ../node_modules/.bin/http-server -p $(PORT)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,6 @@ Example demonstrating: | |
Run: | ||
|
||
``` | ||
$ npm install | ||
$ make serve | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "frint-example-counter", | ||
"version": "0.0.1", | ||
"description": "Counter example in frint", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "webpack" | ||
}, | ||
"author": "Travix International B.V.", | ||
"license": "MIT", | ||
"dependencies": { | ||
"frint": "^1.3.0", | ||
"frint-react": "^1.3.0", | ||
"react": "^15.4.2", | ||
"react-dom": "^15.4.2", | ||
"http-server": "^0.9.0", | ||
"rxjs": "^5.2.0" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.10.1", | ||
"babel-core": "^6.13.2", | ||
"babel-eslint": "^7.1.0", | ||
"babel-loader": "^6.2.9", | ||
"babel-preset-travix": "^1.1.0", | ||
"babel-register": "^6.9.0", | ||
"webpack": "^2.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// react-dom | ||
(function () { | ||
var m = require('react-dom'); | ||
if (typeof m.default !== 'undefined') { | ||
window['ReactDOM'] = m.default; | ||
return; | ||
} | ||
window['ReactDOM'] = m; | ||
})(); | ||
|
||
// react | ||
(function () { | ||
var m = require('react'); | ||
if (typeof m.default !== 'undefined') { | ||
window['React'] = m.default; | ||
return; | ||
} | ||
window['React'] = m; | ||
})(); | ||
|
||
// rxjs | ||
(function () { | ||
var m = require('rxjs'); | ||
if (typeof m.default !== 'undefined') { | ||
window['Rx'] = m.default; | ||
return; | ||
} | ||
window['Rx'] = m; | ||
})(); | ||
|
||
// frint | ||
(function () { | ||
var m = require('frint'); | ||
if (typeof m.default !== 'undefined') { | ||
window['Frint'] = m.default; | ||
return; | ||
} | ||
window['Frint'] = m; | ||
})(); | ||
|
||
// frint-react | ||
(function () { | ||
var m = require('frint-react'); | ||
if (typeof m.default !== 'undefined') { | ||
window['FrintReact'] = m.default; | ||
return; | ||
} | ||
window['FrintReact'] = m; | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
entry: { | ||
vendor: __dirname + '/vendor.js' | ||
}, | ||
devtool: 'source-map', | ||
output: { | ||
path: __dirname + '/../build/js', | ||
filename: '[name].js' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
module.exports = { | ||
entry: { | ||
core: __dirname + '/core/index.js' | ||
}, | ||
devtool: 'source-map', | ||
output: { | ||
path: __dirname + '/build/js', | ||
filename: '[name].js' | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(js)$/, | ||
loader: 'babel-loader', | ||
query: { | ||
presets: [ | ||
'travix' | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
externals: { | ||
'frint': 'Frint', | ||
'frint-react': 'FrintReact', | ||
'react': 'React', | ||
'react-dom': 'ReactDOM', | ||
'rxjs': 'Rx' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"presets": [ | ||
"travix" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,15 @@ | ||
PORT=5002 | ||
|
||
bundle: | ||
make bundle-frint | ||
make bundle-example | ||
|
||
bundle-example: | ||
(cd ./core && npm run build) | ||
(cd ./app-counter && npm run build) | ||
(cd ./app-color && npm run build) | ||
(cd ./app-todos && npm run build) | ||
(cd ./app-reversed && npm run build) | ||
bundle-vendor: | ||
(cd vendors && ../node_modules/.bin/webpack) | ||
|
||
bundle-frint: | ||
(cd ../../ && npm run dist) | ||
make copy-frint | ||
|
||
copy-frint: | ||
(cp ../../packages/frint/dist/frint.js ./build/js/frint.js) | ||
(cp ../../packages/frint-model/dist/frint-model.js ./build/js/frint-model.js) | ||
(cp ../../packages/frint-store/dist/frint-store.js ./build/js/frint-store.js) | ||
(cp ../../packages/frint-react/dist/frint-react.js ./build/js/frint-react.js) | ||
bundle: | ||
npm run build | ||
|
||
serve-only: | ||
(cd ./build && ../../../node_modules/.bin/http-server -p $(PORT)) | ||
(cd ./build && ../node_modules/.bin/http-server -p $(PORT)) | ||
|
||
serve: | ||
make bundle-vendor | ||
make bundle | ||
make serve-only |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,6 @@ Lots of examples in one demo. | |
Run: | ||
|
||
``` | ||
$ npm install | ||
$ make serve | ||
``` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.