Bugzilla – Attachment 60861 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]
[SIGNED-OFF] Bug 17297 - Add npm and webpack config files
SIGNED-OFF-Bug-17297---Add-npm-and-webpack-config-.patch (text/plain), 3.09 KB, created by
Josef Moravec
on 2017-03-07 10:41:56 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17297 - Add npm and webpack config files
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2017-03-07 10:41:56 UTC
Size:
3.09 KB
patch
obsolete
>From ad48a59bbf1f1bb6e6d124e7e4506b98bf74cc90 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] [SIGNED-OFF] Bug 17297 - Add npm and webpack config files > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > package.json | 17 +++++++++++++++++ > webpack-production.config.js | 38 ++++++++++++++++++++++++++++++++++++++ > webpack.config.js | 24 ++++++++++++++++++++++++ > 3 files changed, 79 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..457715e >--- /dev/null >+++ b/webpack-production.config.js >@@ -0,0 +1,38 @@ >+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..02d32cc >--- /dev/null >+++ b/webpack.config.js >@@ -0,0 +1,24 @@ >+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