Skip to content

Commit 090eebc

Browse files
committed
remove static library versions of bootstrap, jquery, popper.js and fix brunch-config.js
1 parent f03f9ba commit 090eebc

8 files changed

Lines changed: 81 additions & 31 deletions

File tree

build/brunch-config.js

Lines changed: 62 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,60 @@
1+
/*//////////////////////////////// ABOUT \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\
2+
3+
BRUNCH CONFIGURATION
4+
5+
Brunch is a "task runner" that performs the common operations for
6+
developing webapps. Essentially it transforms your source files and
7+
copies them to a 'public' directory, where a built-in webserver can
8+
make them available to viewing in a browser by visiting localhost.
9+
It also supports "plugins" to provide additional functions like source
10+
code minification and transpiling other script languages into pure CSS
11+
and Javascript. This is similar to other popular task runners like
12+
Webpack, Grunt, and Gulp.
13+
14+
We're using Brunch for NetCreate because it has a 'minimal
15+
configuration' philosophy. Although you still do need to do some
16+
configuration (see below) it's a lot less confusing than either Grunt or
17+
Webpack, and is considerably less verbose than Gulp. Brunch is also a
18+
mature project (6+ years) so it is a fairly safe bet moving forward.
19+
20+
\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ * //////////////////////////////////////*/
21+
22+
// CommonJS module format
23+
// exports a configuration object
124
module.exports = {
225

3-
files: {
4-
// NOTE: brunch includes ONLY files referred to by require() statements
5-
// NOTE: app, vendor, public are relative to this config file
6-
// NOTE: any directory is fair game for fileglob patterns
26+
/// CONCATENATION /////////////////////////////////////////////////////////////
27+
/*/ Brunch intelligently combines source javascript, stylesheets, and
28+
templates into single files. It includes not only your source files in
29+
the app/ directory, but is smart enough to look in node_modules/ and
30+
vendor/ directories. The joinTo property allows multiple ways to define
31+
all the sources you want combined into the named file.
32+
- - -
33+
NOTE: brunch includes ONLY files referred to by require() statements
34+
NOTE: app, vendor, public are relative to this config file
35+
NOTE: any directory is fair game for pattern matching
36+
/*/ files: {
737
javascripts: {
838
joinTo: {
939
'netc-app.js' : /^app/,
1040
'netc-lib.js' : /^(?!app)/
1141
}
1242
},
1343
stylesheets: {
14-
joinTo : 'netc-app.css'
44+
joinTo : {
45+
'netc-app.css' : [
46+
/^app/,
47+
/^node_modules/
48+
]
49+
}
1550
}
1651
},
1752

18-
plugins: {
53+
/// PLUGIN CONFIGURATION //////////////////////////////////////////////////////
54+
/*/ Brunch plugins generally work without configuration, but sometimes you need
55+
to do it, particularly for plugins that interface with other npm packages
56+
with their own configuration requirements (e.g. babel)
57+
/*/ plugins: {
1958
babel: {
2059
// brunch-babel plugin requires additional babel settings to enable jsx processing
2160
// npm i --save-dev babel babel-preset-env babel-preset-react
@@ -24,8 +63,24 @@ module.exports = {
2463
}
2564
},
2665

27-
server: {
66+
/// SERVER CONFIGURATION //////////////////////////////////////////////////////
67+
/*/ Brunch will use its internal server unless a brunch-server.js module is
68+
present. The module should return a function that accepts a config obj and
69+
a callback function that is invoked when the server is done initializing.
70+
It should return an object with a close() method (as ExpressJS app does)
71+
/*/ server: {
72+
// viewing url is http://localhost:3000
2873
port : 3000
74+
},
75+
76+
/// NPM INTEGRATION ///////////////////////////////////////////////////////////
77+
/*/ Brunch is aware of the node_modules directory but sometimes needs help to
78+
find the right source files to include in processing.
79+
/*/ npm: {
80+
styles: {
81+
/// include these css files in the stylesheets joinTo
82+
bootstrap: ['dist/css/bootstrap.min.css']
83+
}
2984
}
3085

3186
};

build/brunch-server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*//////////////////////////////// ABOUT \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\
22
33
NODE CUSTOM SERVER
4-
brunch-server.js is automatically used by brunch if it exists
4+
see brunch-config.js for more information
55
66
\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ * //////////////////////////////////////*/
77

build/package-lock.json

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
"uglify-js-brunch": "^2.10.0"
2828
},
2929
"dependencies": {
30+
"bootstrap": "^4.0.0",
31+
"jquery": "^3.3.1",
32+
"popper.js": "^1.12.9",
3033
"react": "^16.2.0",
3134
"react-dom": "^16.2.0"
3235
}

build/vendor/bootstrap.min.css

Lines changed: 0 additions & 7 deletions
This file was deleted.

build/vendor/bootstrap.min.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

build/vendor/jquery-3.2.1.slim.min.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

build/vendor/popper.min.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)