Skip to content

Commit 571ab0c

Browse files
author
Bulfair, Matt
committed
changes to paths
1 parent 3f2c9d7 commit 571ab0c

File tree

3 files changed

+99
-95
lines changed

3 files changed

+99
-95
lines changed

patternlab-config.json

+91-84
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,95 @@
11
{
2-
"paths": {
3-
"source": {
4-
"root": "./source/",
5-
"app": "./source/_app/",
6-
"patterns": "./source/_patterns/",
7-
"data": "./source/_data/",
8-
"meta": "./source/_meta/",
9-
"annotations": "./source/_annotations/",
10-
"styleguide": "./node_modules/styleguidekit-assets-default/dist/",
11-
"patternlabFiles": "./node_modules/styleguidekit-mustache-default/views/",
12-
"js": "./source/js/",
13-
"images": "./source/images/",
14-
"fonts": "./source/fonts/",
15-
"css": "./source/css/"
2+
"app": {
3+
"webpackDevServer": {
4+
"url": "http://localhost",
5+
"port": 3000,
6+
"watchContentBase": true,
7+
"watchOptions": {
8+
"aggregateTimeout": 500,
9+
"ignored": [],
10+
"info-verbosity": "verbose"
11+
}
12+
},
13+
"webpackMerge": {
14+
"entry": "replace"
15+
},
16+
"uglify": {
17+
"sourceMap": false,
18+
"parallel": true,
19+
"uglifyOptions": {
20+
"mangle": false
21+
}
22+
},
23+
"namespace": ""
1624
},
17-
"public": {
18-
"root": "./public/",
19-
"patterns": "./public/patterns/",
20-
"data": "./public/styleguide/data/",
21-
"annotations": "./public/annotations/",
22-
"styleguide": "./public/styleguide/",
23-
"js": "./public/js/",
24-
"images": "./public/images/",
25-
"fonts": "./public/fonts/",
26-
"css": "./public/css/"
27-
}
28-
},
29-
"server": {
30-
"url": "http://localhost",
31-
"port": 3000
32-
},
33-
"app": {
34-
"uglify": {
35-
"sourceMap": false,
36-
"parallel": true,
37-
"uglifyOptions": {
38-
"mangle": false
39-
}
25+
"paths": {
26+
"source": {
27+
"root": "./source/",
28+
"app": "./source/_app/",
29+
"patterns": "./source/_patterns/",
30+
"data": "./source/_data/",
31+
"meta": "./source/_meta/",
32+
"annotations": "./source/_annotations/",
33+
"styleguide": "./node_modules/styleguidekit-assets-default/dist/",
34+
"patternlabFiles":
35+
"./node_modules/styleguidekit-mustache-default/views/",
36+
"js": "./source/js/",
37+
"images": "./source/images/",
38+
"fonts": "./source/fonts/",
39+
"css": "./source/css/"
40+
},
41+
"public": {
42+
"root": "./public/",
43+
"patterns": "./public/patterns/",
44+
"data": "./public/styleguide/data/",
45+
"annotations": "./public/annotations/",
46+
"styleguide": "./public/styleguide/",
47+
"js": "./public/js/",
48+
"images": "./public/images/",
49+
"fonts": "./public/fonts/",
50+
"css": "./public/css/"
51+
}
4052
},
41-
"namespace": ""
42-
},
43-
"webpackMerge": {
44-
"entry": "replace"
45-
},
46-
"styleGuideExcludes": [],
47-
"defaultPattern": "all",
48-
"defaultShowPatternInfo": false,
49-
"cleanPublic": true,
50-
"patternExtension": "mustache",
51-
"debug": false,
52-
"ishControlsHide": {
53-
"s": false,
54-
"m": false,
55-
"l": false,
56-
"full": false,
57-
"random": false,
58-
"disco": false,
59-
"hay": true,
60-
"mqs": false,
61-
"find": false,
62-
"views-all": false,
63-
"views-annotations": false,
64-
"views-code": false,
65-
"views-new": false,
66-
"tools-all": false,
67-
"tools-docs": false
68-
},
69-
"ishViewportRange": {
70-
"s": [240, 500],
71-
"m": [768, 768],
72-
"l": [800, 2600]
73-
},
74-
"patternStateCascade": ["inprogress", "inreview", "complete"],
75-
"patternStates": {},
76-
"patternExportPatternPartials": [],
77-
"patternExportDirectory": "./pattern_exports/",
78-
"cacheBust": true,
79-
"starterkitSubDir": "dist",
80-
"starterkitPostInstallClean": false,
81-
"outputFileSuffixes": {
82-
"rendered": ".rendered",
83-
"rawTemplate": "",
84-
"markupOnly": ".markup-only"
85-
},
86-
"cleanOutputHtml": true,
87-
"exportToGraphViz": false
53+
"styleGuideExcludes": [],
54+
"defaultPattern": "all",
55+
"defaultShowPatternInfo": false,
56+
"cleanPublic": true,
57+
"patternExtension": "mustache",
58+
"debug": false,
59+
"ishControlsHide": {
60+
"s": false,
61+
"m": false,
62+
"l": false,
63+
"full": false,
64+
"random": false,
65+
"disco": false,
66+
"hay": true,
67+
"mqs": false,
68+
"find": false,
69+
"views-all": false,
70+
"views-annotations": false,
71+
"views-code": false,
72+
"views-new": false,
73+
"tools-all": false,
74+
"tools-docs": false
75+
},
76+
"ishViewportRange": {
77+
"s": [240, 500],
78+
"m": [768, 768],
79+
"l": [800, 2600]
80+
},
81+
"patternStateCascade": ["inprogress", "inreview", "complete"],
82+
"patternStates": {},
83+
"patternExportPatternPartials": [],
84+
"patternExportDirectory": "./pattern_exports/",
85+
"cacheBust": true,
86+
"starterkitSubDir": "dist",
87+
"starterkitPostInstallClean": false,
88+
"outputFileSuffixes": {
89+
"rendered": ".rendered",
90+
"rawTemplate": "",
91+
"markupOnly": ".markup-only"
92+
},
93+
"cleanOutputHtml": true,
94+
"exportToGraphViz": false
8895
}

source/_app/samples/webpack.app.scss.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ module.exports = env => {
3030
{
3131
gitignore: true
3232
}
33-
).map(function (filePath) {
34-
return filePath;
35-
})
33+
)
3634
},
3735
optimization: {
3836
splitChunks: {
@@ -54,8 +52,7 @@ module.exports = env => {
5452
}),
5553
new webpack.DefinePlugin({
5654
NAMESPACE: appNamespace
57-
}),
58-
new webpack.debug.ProfilingPlugin()
55+
})
5956
],
6057
module: {
6158
rules: [

webpack.config.babel.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
1515
module.exports = env => {
1616
const { ifProduction, ifDevelopment } = getIfUtils(env);
1717

18-
const config = merge.smartStrategy(plConfig.webpackMerge)(
18+
const config = merge.smartStrategy(plConfig.app.webpackMerge)(
1919
{
2020
devtool: ifDevelopment("source-map"),
2121
context: resolve(__dirname, plConfig.paths.source.root),
@@ -57,7 +57,6 @@ module.exports = env => {
5757
new webpack.HotModuleReplacementPlugin(),
5858
new webpack.NamedModulesPlugin()
5959
),
60-
6160
// Remove with PL Core 3.x
6261
new CopyWebpackPlugin([
6362
{
@@ -116,7 +115,6 @@ module.exports = env => {
116115
`${plConfig.paths.source.data}**/*.json`,
117116
`${plConfig.paths.source.fonts}**/*`,
118117
`${plConfig.paths.source.images}**/*`,
119-
`${plConfig.paths.source.js}**/*`,
120118
`${plConfig.paths.source.meta}**/*`,
121119
`${plConfig.paths.source.annotations}**/*`
122120
];
@@ -154,11 +152,13 @@ module.exports = env => {
154152
]),
155153
devServer: {
156154
contentBase: resolve(__dirname, plConfig.paths.public.root),
157-
port: plConfig.server.port,
155+
publicPath: `${plConfig.app.webpackDevServer.url}:${plConfig.app.webpackDevServer.port}`,
156+
port: plConfig.app.webpackDevServer.port,
158157
open: true,
159158
hot: true,
160-
watchContentBase: false
161-
},
159+
watchContentBase: plConfig.app.webpackDevServer.watchContentBase,
160+
watchOptions: plConfig.app.webpackDevServer.watchOptions
161+
},
162162
module: {
163163
rules: [
164164
{

0 commit comments

Comments
 (0)