ga-wdi-boston / browser-template-archived Goto Github PK
View Code? Open in Web Editor NEWCLICK HERE BEFORE YOU USE THIS TEMPLATE: http://i.imgur.com/UmjLrOc.gif
License: Other
CLICK HERE BEFORE YOU USE THIS TEMPLATE: http://i.imgur.com/UmjLrOc.gif
License: Other
So this
<head>
<script src="example.js" defer></script>
</head>
rather than
<body>
<script src="example.js"></script>
</body>
This recurs frequently enough that we should address it at least to say "don't".
Where webpack tests for ttf | eot | svg files, it doesn't look for other image files. Add jpg | png after svg to include these file types when grunt serve/build is run.
@gaand and @jrhorn424 agree it should not be in this template.
Code to remove:
// attach getFormFields globally
require('expose?getFormFields!./lib/get-form-fields.js');
In order to ease deployment, I suggest moving all files into a src
or app
directory, and then building to a dist
directory. Additionally, using a tmp
folder for deployment to github pages allows us to copy files to the gh-pages branch without using a .gitignore.
Require developers to use
const getFormFields = require('../../../lib/get-form-fields.js');
in UI related files.
PS - with correct leading '../'
.
Please remove those, thanks.
Jasmine tests work on the node side, but we need browser tests on the client side. We'll need to integrate webpack into the testing pipeline somehow...
Add to head of index.html <meta name="viewport" content="width=device-width, initial-scale=1">
for media queries to kick in properly
Require developers to use
const $ = require('jquery');
This might help with separation of concerns. It will likley help with diagnosing probelms with same.
I think this requires modifying the loader config in webpack.
grunt build
to dist
directory (directory tracked in #21; dist
is untracked and useful for local testing)grunt deploy
copies dist
to tmp
(tmp
must be untracked)git checkout gh-pages
grunt clean
(git clean
everything; not yet written)tmp
to current working directoryAnd maybe others!
per @gaand
Formally vendor.bundle.js
This seems incorrect. If you haven't added any new npm modules, I think that should build once and remain unchanged.
Ethan was attempting to look for a defined variable, he put a debugger in right after and it was show as not defined. Web pack was uglyifying. Console.log work, breakpoint worked, but debugger didn't work. Doesn't work in chrome, works in safari, not in chrome canary.... Chrome bug?
Developers don't seem to be using glyphicons that much. Does it make sense to send SVGs and fonts to the bitbucket instead of building output?
In grunt/webpack-dev-server-.js
:
// enable live reload without a script tag
webpackConfig.entry.vendor.unshift("webpack-dev-server/client?http://localhost:8080");
Currently:
var y = {
- fn () { // BAD
+ fn() { // GOOD
return 42;
}
}
I prefer the space (as does Ember), but I don't mind if it is missing. Change to .jscsrc
, please add alphabetically by key:
+ "disallowSpaceAfterObjectKeys": {
+ "allExcept": ["method"]
+ },
Our agreed upon naming scheme.
The fix for #23 caused an issue because I misunderstood how grunt configuration worked. I'm mutating the webpack config from the dev server config, and since all configs are parsed before any task runs, the mutation present in dev server config affects the webpack build process.
The result is that the dev server client code is bundled into vendor.bundle.js
. Sadness ensues for deployed apps.
To support bootstrap inclusion in some projects.
So, <library>.min.js
or <library>.min.css
or in the case of handlebars, handlebars.runtime.min.js
(I think).
Others?
Test this to make sure it works before committing.
Make more parallel with node-template.
Explore options for browser running tests (phantomjs, chrome, safari, firefox, others)
use const
instead of var
?
https://github.com/ga-wdi-boston/browser-template/blob/master/assets/scripts/index.js
To support bootstrap inclusion in some projects.
This would give us (1) a huge performance increase on builds and livereload, and (2) allow us to use a simpler sourcemapping scheme (we have to use an expensive one due to the infamous chrome bug #17).
Technical details here, but it boils down to how webpack versus rollup manages isolated scope:
How do I share setup objects between tasks? Is it any different when the configuration files are js rather than json files?
... in addition to already tracking changes in JS files.
Then, when html files are changed, livereload will kick in.
Should read: "license": { "software": "GNU GPLv3", "content": "CCBYNCSA 4.0" }
Re: GitHub Pages seems to be excluding files with "vendor" in the name
Hey Antony,
Thanks for reaching out! We've recently updated to Jekyll v3.3, which ignores vendored files by default. To include your vendored files in your build, you'll have to add this to your _config.yml
file:
include:
- vendor
Alternatively, if you're not using Jekyll, you can add a .nojekyll
to the root of your repository to disable Jekyll completely during your site build, so those files won't be ignored.
Could you give that a try and let me know if that works?
Cheers,
Antonio
GitHub Support
Deploying a webpack built app with "vendor.bundle.js" or "vendor.js" stopped working sometime yesterday.
Renaming the file to a name without "vendor", I tried "bob.js" and "dependencies.js", worked fine.
<!-- Do not add `script` or `link` tags unless you know what you are doing -->
jscs and js-beautifier are redundant. Grunt configuration already removed.
For example, prefer bundle.css over app.css. Also, have a manifest called index.css instead of using "multiple entries" in scripts/styles. That way, we can take load order out of the grunt configuration.
Browserify works just fine when downloading JS via npm. But, we should have a way of bundling stylesheets as well. I'm open to other options aside from webpack.
Ideally, these tools would:
Actually, duojs
is really exciting and very simple alternative to browserify
, atomify
, and webpack
. For future iterations, the templates should utilize duojs
.
For now, I'll replace browserify
with atomify
, since the latter behaves as the former, but also allows for css includes.
Webpack has what we need (for now). 😄
js-templates-diagnostic
js-templates-talk
Add a test that uses the html fixture and jquery to manipulate the fixture.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.