Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Reorganizing Static Files #17

Merged
merged 685 commits into from

8 participants

@doctyper

This pull request deals with restructuring the updated static files. To recap:

Static Folder
  • project/static is now ignored in version control. Nothing in this folder may be committed. It is a catch-all for compiled static output, nothing more.
  • project/static has moved to project/source
Resources Folder
  • The resources folder is no more
  • resources/compass/scss has moved to project/source/scss
  • resources/compass/gems has moved to .bundle/gems

To accommodate the reorganization, some features have been introduced across RBP. You should probably take the time to read this, it will affect your project:

Caboose Changes
  • Caboose compiles as usual (grunt compass:dev).
  • Sprites are now compiled to project/static/img, leaving the source directory in pristine condition.
  • For interoperability purposes, compiled sprites must be saved to project/source/img/sprites.
Rosy Changes
  • project/static/js has moved to project/source/js
Image Changes
  • project/static/img has moved to project/source/img
  • grunt build:img will now copy images into the static directory and optimize them. Note that this functionality requires additional binaries to be installed, mainly optipng and jpegtran. RED Boilerplate will warn you about this on install.
New Functionality
  • grunt copy will copy anything else you require from project/source/* into project/static/*. Because this will probably be customized in a project-per-project basis, you can access and customize this task inside of your local robyn/tasks/copy.js. It's very extensible, and can actually copy any folder anywhere.
Misc
  • Since we can now safely ignore project/static, RBP is no longer ignoring *.css, *.min.js specifically.
  • I've removed test folders from Caboose and Rosy. These just served to clutter projects and are only useful in their proper repositories.
  • Updated Modernizr to ignore more expensive folders.
  • Updates some fringe cases when checking system dependencies.
tl;dr

#will

doctyper added some commits
@doctyper doctyper Merge remote-tracking branch 'upstream/feature/less-verbose' into fea…
…ture/robyn
3fef420
@doctyper doctyper Updating path to config dir. bbab2ee
@doctyper doctyper Default tasks now checks if project is initialized. eef75fc
@doctyper doctyper Merge remote-tracking branch 'upstream/feature/less-verbose' into fea…
…ture/robyn
ff4cc97
@doctyper doctyper Merge remote-tracking branch 'upstream/feature/less-verbose' into fea…
…ture/robyn
55b0475
@doctyper doctyper Merge remote-tracking branch 'upstream/feature/less-verbose' into fea…
…ture/robyn
17cddfa
@doctyper doctyper Merge remote-tracking branch 'upstream/feature/less-verbose' into fea…
…ture/robyn
3ebfbc1
@doctyper doctyper Merge remote-tracking branch 'upstream/feature/less-verbose' into fea…
…ture/robyn
73ec1e1
@doctyper doctyper Merge remote-tracking branch 'upstream/develop' into feature/robyn 2d4e9a5
@doctyper doctyper Updating oxblood runner. bd88c62
@doctyper doctyper Updating output. c4665d7
@doctyper doctyper Merge remote-tracking branch 'upstream/develop' into feature/robyn 2827aa6
@doctyper doctyper Merge remote-tracking branch 'upstream/develop' into feature/robyn c2756a2
@doctyper doctyper Tweaking plugin install prompt. 7dd3a6e
@doctyper doctyper Merge remote-tracking branch 'upstream/develop' into feature/robyn cf7d419
@doctyper doctyper Merge remote-tracking branch 'upstream/develop' into feature/robyn
Conflicts:
	tasks/start.js
8e091ec
@doctyper doctyper Merge remote-tracking branch 'upstream/develop' into feature/robyn 7db660f
@doctyper doctyper Add colors requirement. Warn when a failure occurs. a8ea715
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn cbe00e7
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 41976e7
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn
Conflicts:
	tasks/helpers/spawn.js
65e6297
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 386b994
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn cdde2de
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn ecce318
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 88309c1
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 2712977
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 8ace5d6
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn
Conflicts:
	tasks/default.js
74a8581
@doctyper doctyper Updating requirejs.js 12105fc
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 0a62720
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 7e3335c
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn fd7c5c0
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 85f9077
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 6e97659
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn e86da6a
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn b6f4be7
@doctyper doctyper Remove `localFiles` config option. d179d18
@doctyper doctyper Merge remote-tracking branch 'local/master' into feature/robyn 1322bd1
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn eccfb95
@doctyper doctyper Also make sure to clean up after upgrade. ad1f877
@doctyper doctyper Adding support for running update scripts. 8e8e3f2
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn fa77fd6
@doctyper doctyper Exit if folder is not found. 16ceeb8
@doctyper doctyper Adding update script. 9fcc6ab
@doctyper doctyper Add install / upgrade prompts. 8a8e938
@doctyper doctyper Add install/upgrade prompts. cb04812
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 0f8cb0f
@doctyper doctyper Add install / upgrade prompts. 8b38fcc
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn
Conflicts:
	tasks/helpers/check-dependencies.js
c0e09ff
@doctyper doctyper Add install / upgrade prompts. f338f5b
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn
Conflicts:
	tasks/helpers/check-dependencies.js
8065d20
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn
Conflicts:
	tasks/helpers/check-dependencies.js
9caa14c
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 34e3f77
@doctyper doctyper Don't check for initialized in tasks task. 860eaaf
@doctyper doctyper Update param order. 11a4350
@doctyper doctyper Make paths relative. b843f12
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn
Conflicts:
	defaults/robyn.json
a8cedf2
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn cb38720
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 27528e9
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 078464c
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 2689b2b
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 95784fa
@doctyper doctyper Adding custom compass task, using `compass watch` in place of running…
… compass compile on a grunt watch cycle.
bb64c2e
@doctyper doctyper If found, remove config.rb. All settings should come from the compass…
….js task.
f851c13
@doctyper doctyper Tweak description. 7e63986
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 7b15a93
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn bbc86b2
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 252094b
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 5d6e7dd
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn ba70505
@doctyper doctyper Updating README. 1ee3856
@doctyper doctyper Update README. 7933868
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn
Conflicts:
	README.md
c5fc700
@doctyper doctyper Moving JSHint into Rosy plugin. b966d20
@doctyper doctyper Add JSHint as dependency. 8c41da7
@doctyper doctyper Update JSHint version. 924cef0
@doctyper doctyper Update Robyn on all successful update calls. 8b8ee95
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 712bca8
@doctyper doctyper Scope to project/static/js cc283b1
@doctyper doctyper Scoping .jshintrc 9737d58
@doctyper doctyper This push was not ready for deployment. 1dec2d1
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 602fd49
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn
Conflicts:
	README.md
644d0e5
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn e092d4e
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 3de3e5f
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 1a24da9
@doctyper doctyper Merge w/ upstream 431c2dc
@doctyper doctyper Updating paths to Caboose files. 6cb038c
@doctyper doctyper Move node/print definition inside requirejs multitask. Fixes bug with…
… grunt build task.
d8fcce9
@doctyper doctyper Add RED Boilerplate specific tests. 66f2584
@doctyper doctyper Since Modernizr files are async downloaded, we can't test for exact o…
…utput.
5a6bf37
@doctyper doctyper Test exact output. 26a17fc
@doctyper doctyper If (for some reason) the file exists at the destination, remove it fi…
…rst.
311e51d
@doctyper doctyper Ignore anything in deploy d0bbea0
@doctyper doctyper Add Statix task tests. 9ae4979
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn
Conflicts:
	test/runner.js
	test/tasks.js
725a327
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 3b57737
@doctyper doctyper Adding test for RED-specific files. acd79a4
@doctyper doctyper Remove stray comment. fb049ee
@doctyper doctyper Pull (for now) from the feature/robyn branch. cad5771
@doctyper doctyper First attempt at setting up Ruby environment. 4c1d57c
@doctyper doctyper Ruby attempt #2 e06ef36
@doctyper doctyper Travis may have Ruby built-in? 31c0397
@doctyper doctyper Find real path to file. 19b8f3b
@doctyper doctyper Update apt-get before running. Add virtualenv, red-start. 5fbbdb7
@doctyper doctyper Add static. bafe0fb
@doctyper doctyper Enable verbose output for debugging purposes. a742bc5
@doctyper doctyper project/site -> project/Site c00ac2d
@doctyper doctyper JSHint 39d3f5d
@doctyper doctyper Update expected output. 864160b
@doctyper doctyper Updating statix test. 37469d4
@doctyper doctyper Fail on first error. af4bbcb
@doctyper doctyper Account for async tasks. 8af2256
@doctyper doctyper Account for async tasks. 226a424
@doctyper doctyper Bypass build task (for now). ae52077
@doctyper doctyper More async support. 86b9733
@doctyper doctyper More async support. 1e8ed39
@doctyper doctyper More async support. 791fbdf
@doctyper doctyper More async support. 99d98ea
@doctyper doctyper Remove verbose output. 579d051
@doctyper doctyper Running patched nexpect tests to account for pattern matching. 67582f6
@doctyper doctyper More explicit install testing. de4e6b1
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn
Conflicts:
	test/runner.js
bf135f0
@doctyper doctyper Updating Caboose requiredPaths array. 2a3b528
@doctyper doctyper Define an rbp-specific test nest. 796af25
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn a5041ea
@doctyper doctyper Test bundle dependencies. 88cbbbd
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn
Conflicts:
	test/robyn.js
22652df
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn beb02fe
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 169c0a9
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn 25274f0
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/robyn ea48171
@doctyper doctyper Bump this back to 180s 026ad92
@doctyper doctyper Customize for RBP. 5762332
@doctyper doctyper Merge pull request #14 from ff0000/feature/robyn
Make RED Boilerplate a descendant of Robyn
18e0d28
@doctyper doctyper Merge branch 'feature/robyn' into develop 698a156
@doctyper doctyper Merge branch 'develop' of github.com:ff0000/red-boilerplate into develop b8733d7
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop a3aa91e
@doctyper doctyper SASS -> Sass eb88bea
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop 806d425
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop 7384ef3
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop 719e4df
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop
Conflicts:
	tasks/update.js
89060e2
@doctyper doctyper Updating spawn utility. 0bc4bd4
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop 8b13ddc
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop c17b300
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop 652215f
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop 74b9aeb
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop b05a72d
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop
Conflicts:
	test/runner.js
cdafb4a
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop
Conflicts:
	README.md
2cacdca
@doctyper doctyper RBP 1.1.0 release #1 bad157c
@doctyper doctyper Merge branch 'release/1.1.0-1' into develop 5eadcb4
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop
Conflicts:
	README.md
	defaults/robyn.json
	package.json
	test/runner.js
	test/tasks.js
bd57a8f
@doctyper doctyper Fixes bug with overwriting version object. e9ec74e
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop
Conflicts:
	README.md
98b1adf
@doctyper doctyper 1.1.2-1 81570ae
@doctyper doctyper Merge branch 'release/1.1.2-1' into develop 9648058
@doctyper doctyper Adding more files to exclude. c7bc41e
@doctyper doctyper Release 1.1.2-2 b41d131
@doctyper doctyper Merge branch 'release/1.1.2-2' into develop 7f86e5e
@doctyper doctyper Adding a `grunt push` task. This task does the following:
- Parse the current branch
- If the current branch is `master` or `develop`:
	- Run `grunt build`. Build process must complete successfully.
	- Push the current branch to the origin.
- If the current branch is __not__ `master` or `develop`:
	- Push the current branch to the origin.
b4f99ae
@doctyper doctyper Default to "master". e580b2a
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop
Conflicts:
	README.md
	defaults/robyn.json
7a92580
@doctyper doctyper Switch to using develop branch. 004c0e5
@doctyper doctyper Adding error handling. bdcb63a
@doctyper doctyper Push tests will not finish successfully due to no origin remote being…
… attached.
85e5638
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop 852bf06
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop 81e8434
@doctyper doctyper Release 1.2.1-1 763eac7
@doctyper doctyper Merge branch 'release/1.2.1-1' into develop 384754e
@doctyper doctyper Don't test specific errors, it will fail for various reasons. 7c188ce
@doctyper doctyper Release 1.2.1-2 eae0278
@doctyper doctyper Merge branch 'release/1.2.1-2' into develop 407ae26
@doctyper doctyper Delete custom values before generating config.rb so they don't get fe…
…d to Compass.
0cf1ca5
@doctyper doctyper Filter out undefined or null values as Ruby/Compass cannot interpret …
…these values.
f032a28
@doctyper doctyper Use "tap" reporter for Travis builds. 032b274
@doctyper doctyper Release 1.2.1-3 1f05469
@doctyper doctyper Merge branch 'release/1.2.1-3' into develop 2094cde
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop
Conflicts:
	defaults/robyn.json
	test/runner.js
73261f8
@doctyper doctyper Adding flexibility to Rosy unit tests. adf7042
@doctyper doctyper Release 1.2.2-1 334aa2a
@doctyper doctyper Merge branch 'release/1.2.2-1' into develop 81b900f
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop
Conflicts:
	defaults/robyn.json
c91b8b9
@doctyper doctyper Bump red-start version. f8b825e
@doctyper doctyper Release 1.2.3-1 4d17958
@doctyper doctyper Merge branch 'release/1.2.3-1' into develop 796ea75
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop
Conflicts:
	test/tasks.js
318629f
@doctyper doctyper modules -> packages 46d63d9
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop
Conflicts:
	defaults/robyn.json
2ba72c1
@doctyper doctyper Ignore Rosy test files in RBP. 9a082c6
@doctyper doctyper Release 1.3.0-1 6ac507a
@doctyper doctyper Merge branch 'release/1.3.0-1' into develop 96396af
@doctyper doctyper Removing WISHLIST.md 28586eb
@doctyper doctyper - Updating Sass to 3.2.5
- For the sake of clarity, all gems should be equal to (not greater than) the given versions in the Gemfile.
fd46aac
@doctyper doctyper 1.3.0-2 53cd3f1
@doctyper doctyper Merge branch 'release/1.3.0-2' into develop 2272683
@doctyper doctyper Add collected-static/**/* to the excludeFiles array. 5cb552e
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop
Conflicts:
	defaults/robyn.json
3f85767
@doctyper doctyper Bump to 1.3.1-1 347520c
@doctyper doctyper Merge branch 'release/1.3.1-1' into develop 3217e4b
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop 8bf52ea
@doctyper doctyper Handle upcoming boxsizing.htc file. a8fa0f1
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop
Conflicts:
	defaults/robyn.json
416d174
@doctyper doctyper 1.3.2-1 f1132ef
@doctyper doctyper Merge branch 'release/1.3.2-1' into develop 9336e9f
@doctyper doctyper Merge remote-tracking branch 'local/develop' into develop
Conflicts:
	README.md
	package.json
0574093
@doctyper doctyper Moving source JS / Sass into a new "source" directory. f07a456
@doctyper doctyper Renaming static -> source. 0c35575
@doctyper doctyper Ignore project/static. It's now a catch-all for all compiled output. e9d1d13
@doctyper doctyper Install gems to .bundle. 9c75b11
@doctyper doctyper Clean up install script, map paths to new locations. da73272
@doctyper doctyper Remove outdated paths. afd4f83
@doctyper doctyper Remove path to compiled CSS. fd59786
@doctyper doctyper Map paths to new source location. ac3b381
@doctyper doctyper Update Caboose required / excluded paths. 13d7f47
@doctyper doctyper Update rosy with new static / source directories. ba7f17f
@doctyper doctyper Updating Modernizr script. 5777191
@doctyper doctyper Missed trailing comma. ada46d8
@doctyper doctyper Unnecessary nest. 8ccdc45
@doctyper doctyper Log testpath. 12f9a30
@doctyper doctyper Update paths. 2720acd
@doctyper doctyper Remove some references to static folder. 674895f
@doctyper doctyper First attempt at integrating Pulverizr: https://github.com/bentruyman… e4d18e4
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/static-reorg
Conflicts:
	README.md
9b77fc9
@doctyper doctyper Update executable name. b4b393c
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/static-reorg d5d3abc
@doctyper doctyper Merge remote-tracking branch 'local/develop' into feature/static-reorg 76bf22d
@doctyper doctyper Continuing work on image cruncher. 781a648
@doctyper doctyper Got Pulverizr to work just in time to strip all of this functionality…
… out.
a68b37b
@doctyper doctyper Strip out Pulverizr in place of grunt-img. 7135efa
@doctyper doctyper Remove stray console. fbf8120
@doctyper doctyper Copy over a pristine set of images on build. c97e288
@doctyper doctyper Rename for clarity. cb7074c
@doctyper doctyper Add a task to copy source files to static directory on build. 355539f
@doctyper doctyper Tweak language. be315b0
@doctyper doctyper Specify a compiled folder for generated sprites. 1557019
@doctyper doctyper Make this a lot more complicated by ignoring `project/source/sprites`. a5aaba0
@doctyper doctyper Task is not async. 0670551
@doctyper doctyper Specify a generated_images_dir to avoid compiling into the source dir…
…ectory. Specify a sprite_load_path to ensure Compass knows where our sprites should go.
54e9e90
@doctyper doctyper Update tests for new functionality. 40f12ad
@cGV0ZQ

Can we copy the un-minified js files by default as well. Pretty much all projects will want to serve those by default and the ones that don't can pretty easily modify the task to exclude them.

@timrwood

I think the only js that needs to be copied by default is /source/js/libs to /static/js/libs, as those files will need to be served with normal <script> tags. I suppose it's best to uglify them also while they are copied, that way we can have un-minified 3rd party libraries in /source for easier debugging.

@cGV0ZQ

Aren't you going to want to serve un-minified js in development?

@doctyper

After discussions with Peter + Taka, I've made the following changes to this pull request:

  • In the near future, source mapping will become a very useful tool in debugging our JavaScript. It therefore makes sense to have our source files continue to exist in the project/static/js folder.
  • Front-end devs will need to run grunt watch:copy (or just grunt watch) when modifying source JavaScript. This task will monitor and copy JavaScript from project/source to project/static.
  • The grunt copy task now includes both a dev mode and prod mode. As mentioned, this is a robust task that can copy any file anywhere, and is not limited to the static/source folders. You may keep the same functionality in production and development modes, or you may feel free to customize to your needs.
  • We will not be introducing a SOURCE_URL template variable at this time.
  • I've updated watcher methods to only affect modified files. This has resulted in a massive speed boost while watching files.
@cGV0ZQ

+1

@harph

+1

@potench

+1

@patrickjackson

Huzzah!

@doctyper doctyper merged commit 7c627cc into develop
@doctyper doctyper deleted the feature/static-reorg branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.