Skip to content
This repository was archived by the owner on Sep 20, 2022. It is now read-only.
Open
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ node_modules
coverage

/lib/static/client.js
/lib/static/client.js.map.json
/lib/static/client.js.map
17 changes: 13 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
"gemini-gui": "./bin/gemini-gui"
},
"scripts": {
"build-client": "browserify lib/client --debug -p [minifyify --compressPath . --map /client.js.map.json --output ./lib/static/client.js.map.json] -t hbsfy -o ./lib/static/client.js",
"build-client": "webpack",
"prepublish": "npm run build-client",
"test": "istanbul test _mocha --require ./test/setup.js test/*",
"lint": "jshint . && jscs ."
"lint": "jshint . && jscs .",
"precommit": "npm run lint",
"preversion": "npm run lint && npm test"
},
"author": "Sergey Tatarintsev <sevinf@yandex-team.ru> (https://github.com/SevInf)",
"license": "MIT",
Expand All @@ -27,17 +29,24 @@
"opener": "^1.4.0",
"q": "^1.0.1",
"q-io": "^1.11.4",
"react": "^0.14.7",
"react-dom": "^0.14.7",
"resolve": "^1.0.0",
"semver": "^3.0.1",
"temp": "^0.8.1"
},
"devDependencies": {
"browserify": "^5.11.1",
"babel-core": "^6.7.2",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"chai": "^3.5.0",
"chai-as-promised": "^5.2.0",
"dirty-chai": "^1.2.2",
"gemini": "^2.1.0",
"handlebars-loader": "^1.1.4",
"hbsfy": "^2.1.0",
"husky": "^0.11.3",
"istanbul": "^0.3.2",
"jscs": "^1.6.2",
"jshint": "^2.5.6",
Expand All @@ -46,7 +55,7 @@
"proxyquire": "^1.7.3",
"sinon": "^1.17.3",
"sinon-chai": "^2.8.0",
"watchify": "^1.0.2"
"webpack": "^1.12.14"
},
"directories": {
"test": "test"
Expand Down
42 changes: 42 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
var webpack = require('webpack');

module.exports = {
debug: false,
devtool: 'source-map',
entry: './lib/client',
output: {
path: './lib/static',
filename: 'client.js'
},
plugins: [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({
mangle: true,
compress: {
warnings: false // Suppress uglification warnings
}
}),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
})
],
module: {
loaders: [
{
test: /\.(js|jsx)$/,
loader: 'babel',
include: __dirname + '/lib/client',
query: {
presets: ['es2015', 'react']
}
},
{
test: /\.hbs$/,
loader: 'handlebars'
}
]
}
};