You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: build/docs/dev_log.md
+27-10Lines changed: 27 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,31 @@
1
-
DEV LOG
1
+
DEV LOG for WEEK STARTING FEB 26 2018
2
+
3
+
Q. Can I easily add D3 to our framework?
4
+
A. The Brunch way says just NPM it. This works within the view modules, but not in simplehtml.
5
+
For that, load the library from CDN.
6
+
7
+
8
+
DEV LOG for WEEK STARTING FEB 19 2018
2
9
3
10
Q: Now that I have the module stuff figured out, can I load hyperapp merely by importing it?
4
-
A: No, hyperapp has some weird dependency on babel. there are no docs on brunch+hyperapp, and it looks like hyperapp may not even support JSX in future.
11
+
A: No, hyperapp has some weird dependency on babel. there are no docs on brunch+hyperapp, and it looks like hyperapp may not even support JSX in future.
5
12
6
13
Q: Adding bootstrap 4. Instead of installing it into the dev environment, I'm copying bootstrap, jquery3.2.1, and popper.js into the vendor directory.
14
+
A: After figuring out how to modify brunch-config.js, I put this back into the package.json itself. Everything now runs cleanly on install.
15
+
16
+
Q: Let's add ReactBootstrap
17
+
A: Added reactstrap for 4.0.0, which adds react-popper and react-transition
18
+
Have to convert AppContainer to use the new reactstrap stuff
19
+
20
+
Q: Let's add Routing through ReactRouter
21
+
A: ReactRouter has issues loading as an 'import' compatible library
22
+
A: Changed all source to use CommonJS 'require'
23
+
24
+
Now that routing and components are available, can start to lay D3 into it. However, it would be nice to also just jump to a plain html file.
7
25
8
26
9
27
- - -
10
-
BRUNCH BASICS
28
+
NOTE: BRUNCH BASICS
11
29
12
30
* modular code is in app/, but module names do not include app in the path
13
31
* the app/assets directory is special; it's copied as-is (without processing) to the root level of the public folder
@@ -23,21 +41,20 @@ note: had to install babel, babel-brunch, and then also configure babel through
23
41
24
42
npm install --save-dev auto-reload-brunch
25
43
26
-
27
-
NOTE:
28
-
29
-
COMMONJS BASICS
44
+
- - -
45
+
NOTE: COMMONJS BASICS
30
46
31
47
Set module.exports to an object. The module object is set up by the loader I think and passed to our module code as it executes
"module is a plain JavaScript object with an exports property. exports is a plain JavaScript variable that happens to be set to module.exports. At the end of your file, node.js will basically 'return' module.exports to the require function. A simplified way to view a JS file in Node could be this:"
34
51
35
-
Note that require() is a CommonJS function that loads CommonJS modules. The ES6 module command is import(). We can use both formats in brunch, but sometimes the browser seems to get confused and need to launch a new tab to clear state (???)
52
+
Note that require() is a CommonJS function that loads CommonJS modules which is BRUNCH STANDARD. The ES6 module command is import() and is used by tools like Webpack. We can use both formats in brunch, but sometimes the browser seems to get confused and need to launch a new tab to clear state (???). Standardizing on Brunch's require() approach.
36
53
37
54
BRUNCH CONFIG
38
55
39
-
files.javascripts - 'joinTo' combines source files to designated destination file
40
-
files.stylesheets - 'joinTo' combines css files to designated destination file
56
+
files.javascripts - 'joinTo' combines source files to designated destination file
57
+
files.stylesheets - 'joinTo' combines css files to designated destination file
41
58
files.templates - 'joinTo' combines template to destination (???)
42
59
43
60
paths.public - where to put compiled output files (default 'public')
0 commit comments