Skip to content

Commit 5844e96

Browse files
committed
web pack config in a web pack folder
1 parent 88d6c5d commit 5844e96

7 files changed

+14
-9
lines changed

test-app/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
"description": "Test app for the Geek Learning Angular Configuration package",
55
"main": "index.js",
66
"scripts": {
7-
"build:dev": "webpack --config webpack.development.config.js --env development",
8-
"build:production": "webpack --config webpack.production.config.js --env production",
7+
"build:dev": "webpack --config webpack/webpack.development.config.js --env development",
8+
"build:production": "webpack --config webpack/webpack.production.config.js --env production",
99
"serve:fastcss": "npm-run-all --parallel fastcss webpack:watch",
10-
"webpack:watch": "webpack --config webpack.fastcss.config.js --watch --env development",
10+
"webpack:watch": "webpack --config webpack/webpack.fastcss.config.js --watch --env development",
1111
"fastcss": "gulp watch",
12-
"serve": "webpack --config webpack.development.config.js --watch --env development",
13-
"serve2": "webpack --config webpack.development.config.js --watch",
14-
"serve:production": "webpack --config webpack.production.config.js --watch --env production"
12+
"serve": "webpack --config webpack/webpack.development.config.js --watch --env development",
13+
"serve:production": "webpack --config webpack/webpack.production.config.js --watch --env production"
1514
},
1615
"author": "Geek Learning",
1716
"license": "MIT",

test-app/webpack.base.config.js renamed to test-app/webpack/webpack.base.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ var CopyWebpackPlugin = require('copy-webpack-plugin');
1111
var webpack = require('webpack');
1212
var path = require('path');
1313

14+
__dirname = __dirname + '/../';
15+
1416
var jsonConfigurationFile;
1517

1618
for (var i = 0; i < process.argv.length; i++) {
@@ -24,7 +26,7 @@ for (var i = 0; i < process.argv.length; i++) {
2426
module.exports = {
2527
entry: {
2628
app: [
27-
'./src/app/index.module.ts'
29+
path.join(__dirname, "src/app/index.module.ts")
2830
]
2931
},
3032
output: {

test-app/webpack.fastcss.config.js renamed to test-app/webpack/webpack.fastcss.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
1010

1111
var path = require('path');
1212

13+
__dirname = __dirname + '/../';
14+
1315
module.exports = utils.config({
1416
plugins: [
1517
new HtmlWebpackPlugin({

test-app/webpack.nofastcss.config.js renamed to test-app/webpack/webpack.nofastcss.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
1010

1111
var path = require('path');
1212

13+
__dirname = __dirname + '/../';
14+
1315
module.exports = {
1416
entry: {
1517
app: [
16-
'./src/app/style.scss'
18+
path.join(__dirname, "src/app/style.scss")
1719
]
1820
},
1921
plugins: [
2022
new HtmlWebpackPlugin({
21-
pkg: require('./package.json'),
23+
pkg: require(path.join(__dirname, "package.json")),
2224
template: path.join(__dirname, 'src/app/index.cordova.html'),
2325
inject: 'body',
2426
hash: true
File renamed without changes.

0 commit comments

Comments
 (0)