Bugzilla – Attachment 55544 Details for
Bug 17297
Give librarians the ability to add messages to an item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17297 - Add npm and webpack config files
Bug-17297---Add-npm-and-webpack-config-files.patch (text/plain), 3.03 KB, created by
Kyle M Hall
on 2016-09-13 17:08:27 UTC
(
hide
)
Description:
Bug 17297 - Add npm and webpack config files
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2016-09-13 17:08:27 UTC
Size:
3.03 KB
patch
obsolete
>From 3537f999904a15dada4a2c2a6175b103949459eb Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 13 Sep 2016 16:05:35 +0000 >Subject: [PATCH] Bug 17297 - Add npm and webpack config files > >--- > package.json | 17 +++++++++++++++++ > webpack-production.config.js | 39 +++++++++++++++++++++++++++++++++++++++ > webpack.config.js | 25 +++++++++++++++++++++++++ > 3 files changed, 81 insertions(+) > create mode 100644 package.json > create mode 100644 webpack-production.config.js > create mode 100644 webpack.config.js > >diff --git a/package.json b/package.json >new file mode 100644 >index 0000000..85321c9 >--- /dev/null >+++ b/package.json >@@ -0,0 +1,17 @@ >+{ >+ "name": "Koha", >+ "description": "Koha Integrated Library System", >+ "devDependencies": { >+ "babel-core": "^6.14.0", >+ "babel-loader": "^6.2.5", >+ "babel-preset-react": "^6.11.1", >+ "react": "^15.3.1", >+ "react-dom": "^15.3.1", >+ "webpack": "^1.13.2" >+ }, >+ "repository": { >+ "type": "git", >+ "url": "git://git.koha-community.org/koha.git" >+ }, >+ "license": "GPLv3" >+} >diff --git a/webpack-production.config.js b/webpack-production.config.js >new file mode 100644 >index 0000000..ce83f8b >--- /dev/null >+++ b/webpack-production.config.js >@@ -0,0 +1,39 @@ >+var webpack = require('webpack'); >+ >+module.exports = { >+ entry: { >+ moredetail: './koha-tmpl/intranet-tmpl/prog/js/public/moredetail.js', >+ }, >+ output: { >+ path: './koha-tmpl/intranet-tmpl/prog/js/app', >+ filename: '[name].js' // Template based on keys in entry above >+ }, >+ module: { >+ loaders: [ >+ { >+ test: /\.js$/, >+ loader: 'babel-loader', >+ query: { >+ presets: ['react'] >+ } >+ } >+ ] >+ }, >+ resolve: { >+ // you can now require('file') instead of require('file.js') >+ extensions: ['', '.js', '.json'] >+ }, >+ plugins: [ >+ new webpack.DefinePlugin({ >+ 'process.env':{ >+ 'NODE_ENV': JSON.stringify('production') >+ } >+ }), >+ new webpack.optimize.UglifyJsPlugin({ >+ compress:{ >+ warnings: true >+ } >+ }) >+ ] >+}; >+ >diff --git a/webpack.config.js b/webpack.config.js >new file mode 100644 >index 0000000..e2e9c12 >--- /dev/null >+++ b/webpack.config.js >@@ -0,0 +1,25 @@ >+module.exports = { >+ entry: { >+ moredetail: './koha-tmpl/intranet-tmpl/prog/js/public/moredetail.js', >+ }, >+ output: { >+ path: './koha-tmpl/intranet-tmpl/prog/js/app', >+ filename: '[name].js' // Template based on keys in entry above >+ }, >+ module: { >+ loaders: [ >+ { >+ test: /\.js$/, >+ loader: 'babel-loader', >+ query: { >+ presets: ['react'] >+ } >+ } >+ ] >+ }, >+ resolve: { >+ // you can now require('file') instead of require('file.js') >+ extensions: ['', '.js', '.json'] >+ } >+}; >+ >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17297
:
55544
|
55545
|
55546
|
60861
|
60862
|
60863
|
60926
|
60927
|
60928