Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

node 6 #543

Closed
wants to merge 353 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
353 commits
Select commit Hold shift + click to select a range
3bc4cda
Enable source maps only for dev - closes #301
JeffreyWay Oct 13, 2015
b5ba6b5
Do not process imports, by default
JeffreyWay Oct 13, 2015
243c85f
Add config note
JeffreyWay Oct 13, 2015
719466e
v3.3.5
JeffreyWay Oct 14, 2015
58c4372
Vueify is now a default Browserify transformer
JeffreyWay Oct 14, 2015
d5b7b3e
Update dependencies
JeffreyWay Oct 14, 2015
d901479
Bump a few dependency versions
JeffreyWay Oct 25, 2015
87b88f3
Remove unnecessary dependencies - closes #317
JeffreyWay Oct 25, 2015
0ed5870
Add sourcemaps to browserify
furdarius Oct 26, 2015
9d35135
Merge pull request #321 from Furdarius/patch-1
JeffreyWay Nov 2, 2015
11cbc12
Merge pull request #305 from josescgar/master
JeffreyWay Nov 2, 2015
325ff36
Use gulp-concat-css to bubble up @import statements
jeroennoten Nov 15, 2015
1a2e65d
Merge pull request #343 from JeroenNoten/master
JeffreyWay Nov 20, 2015
ccac3d4
Bump Vueify
JeffreyWay Nov 20, 2015
dddcbe1
Bump gulp-babel to v6
JeffreyWay Nov 20, 2015
dc3b660
Working on updates for Babel 6
JeffreyWay Nov 20, 2015
45ee160
Version 4.0.0
JeffreyWay Nov 20, 2015
c4bcc6c
Bump Babelify version
JeffreyWay Nov 20, 2015
eb191fc
Remove Vueify
JeffreyWay Nov 20, 2015
45fe7a4
v4.0.1
JeffreyWay Nov 20, 2015
748d2af
Revert concatCSS - closes #349
JeffreyWay Nov 21, 2015
29731c9
Finish removing concatCSS
JeffreyWay Nov 21, 2015
6203744
Add test to ensure source maps are generated
JeffreyWay Nov 21, 2015
f3591b3
Return React transformation
JeffreyWay Nov 22, 2015
338016e
Enhance default behavour to strip JavaScript debugging when building …
jonhassall Nov 23, 2015
4dbfa11
fixed coffee, less, sass watching
Nov 27, 2015
53ff92d
Add a .editorconfig file to the project.
lucasmichot Nov 30, 2015
b8c4542
browsersync support for dd function
jnbn Nov 30, 2015
24f89a4
Merge pull request #365 from lucasmichot/feature/master/editorconfig
JeffreyWay Dec 1, 2015
f2bf3df
Merge pull request #353 from jonhassall/development
JeffreyWay Dec 1, 2015
8480b45
Makes the Laravel view directory configurable
peterfox Dec 5, 2015
7ed051e
Merge pull request #362 from n7olkachev/master
JeffreyWay Dec 5, 2015
ecb89be
Merge pull request #366 from jnbn/master
JeffreyWay Dec 5, 2015
da3f4fe
Fix doc and remove blank lines
ricardogobbosouza Dec 5, 2015
2561cfd
Load the sourcemaps generated in browserify
odbayar Dec 5, 2015
fa58088
Merge pull request #374 from ricardogobbosouza/feature1
JeffreyWay Dec 8, 2015
948abb9
fixed less, sass watching
ricardogobbosouza Dec 8, 2015
988b7b6
Add mix.combine() task. - closes #358
JeffreyWay Dec 10, 2015
0212244
Add 4.1 changelog
JeffreyWay Dec 10, 2015
7daeedc
Merge pull request #377 from ricardogobbosouza/patch
JeffreyWay Dec 15, 2015
5709f0c
Fix matches multiple files and unnecessary indent_style
ricardogobbosouza Dec 15, 2015
762c4ed
Bump gulp-phpunit - closes #392
JeffreyWay Dec 28, 2015
c561390
v4.1.2
JeffreyWay Dec 28, 2015
5521c3a
Set production by NODE_ENV environment variable
hosmelq Dec 29, 2015
18164d3
Update package.json
zupolgec Jan 4, 2016
8926b67
Switched to cssnano
zupolgec Jan 4, 2016
8c43ba6
Changed function calls
zupolgec Jan 4, 2016
c4a6428
Changed config property name
zupolgec Jan 4, 2016
2741371
Merge pull request #399 from zupolgec/zupolgec-patch-cssnano
JeffreyWay Jan 4, 2016
5ace8b4
First draft of exec plugin
JeffreyWay Jan 4, 2016
878bd31
Fix missing quotes
JeffreyWay Jan 4, 2016
fe66b9e
Add logging + watching to mix.exec()
JeffreyWay Jan 4, 2016
0ae0c36
Remove semicolon
JeffreyWay Jan 4, 2016
03d6408
v4.2.0
JeffreyWay Jan 4, 2016
c4af811
Add 4.2 notes
JeffreyWay Jan 4, 2016
130eb39
Merge pull request #387 from ricardogobbosouza/patch2
JeffreyWay Jan 11, 2016
9170aa8
Merge pull request #394 from hosmelq/master
JeffreyWay Jan 12, 2016
5c8013d
Move line up
JeffreyWay Jan 12, 2016
122c92a
Merge pull request #375 from odbayar/patch-1
JeffreyWay Jan 12, 2016
20c8527
Merge branch 'master' of github.com:laravel/elixir
JeffreyWay Jan 12, 2016
5962e2a
Merge pull request #373 from peterfox/feature/dynamic-view-path
JeffreyWay Jan 12, 2016
7e8b4c8
Fix comment
JeffreyWay Jan 12, 2016
05ec9d3
Reference config properly - closes #404
JeffreyWay Jan 12, 2016
9368b75
Fix section heading level in readme.md
gaomd Jan 23, 2016
5477baf
Merge pull request #417 from gaomd/patch-1
JeffreyWay Jan 27, 2016
ca8cff5
Only apply 'safe' optimisations in cssnano
Jan 28, 2016
6266453
Do not apply unsafe optimisations in cssnano
hosmelq Jan 28, 2016
857c338
Merge pull request #425 from hosmelq/master
JeffreyWay Jan 30, 2016
f60df88
Merge branch 'cssnano-safe' of https://github.com/parsnick/elixir int…
JeffreyWay Jan 30, 2016
67a046c
Merge branch 'parsnick-cssnano-safe'
JeffreyWay Jan 30, 2016
419232a
v4.2.1
JeffreyWay Jan 30, 2016
a95c787
Add 4.2.1 notes
JeffreyWay Jan 30, 2016
589f56c
Moved Uglify Config to the Config.js
Feb 3, 2016
7881b51
Wrote a test for the scripts to test if my changes broke anything.
Feb 4, 2016
1a26399
Ignore bang when asserting files exist - closes #429
JeffreyWay Feb 7, 2016
e2b2a0f
Bump gulp-uglify
JeffreyWay Feb 7, 2016
5fa4b86
Remove gulp-phpunit - closes #418
JeffreyWay Feb 7, 2016
f0491ba
Remove gulp-phpspec plugin
JeffreyWay Feb 7, 2016
cc5cab9
Remove some duplication
JeffreyWay Feb 7, 2016
4442316
add cache and package cache browserify options keys by default
Feb 7, 2016
b0bfaf6
Merge pull request #434 from SethTompkins/master
JeffreyWay Feb 8, 2016
2def8c9
v5.0.0
JeffreyWay Feb 9, 2016
f26fcfe
Add release notes
JeffreyWay Feb 9, 2016
497e455
Fix combine test description
Feb 10, 2016
a41a6dd
Merge pull request #436 from TylerODonnell/master
JeffreyWay Feb 10, 2016
aeed048
Allow Uglify options on all usages
kuiqiang Feb 13, 2016
7734185
Fix version task for windows by replacing backspaces correctly
Feb 13, 2016
9fb20e7
Support dot in filename or folder (if it is first character) in elixi…
atthakorn Feb 15, 2016
128da6d
Disable autoprefixing by cssnano.
Feb 19, 2016
1849334
Merge pull request #443 from waldemarfm/master
JeffreyWay Feb 20, 2016
809eb18
Merge pull request #441 from atthakorn/master
JeffreyWay Mar 7, 2016
d4dbf11
Merge pull request #439 from kuiqiang/master
JeffreyWay Mar 7, 2016
f23784e
Merge pull request #440 from Inch4Tk/master
JeffreyWay Mar 7, 2016
8209853
Remove all comments during CSS minification
adriandmitroca Mar 8, 2016
dfe6ab1
Merge pull request #455 from adriandmitroca/master
JeffreyWay Mar 10, 2016
ea838c2
Fix Config.js "Production mode" comment formatting
amouillard Mar 16, 2016
6718d63
Merge pull request #458 from amouillard/patch-1
JeffreyWay Mar 16, 2016
fc1a10a
Versioned sub-directories are no longer excluded - closes #462
JeffreyWay Mar 30, 2016
23aad0b
Changed watch poll interval to 1000 (10 default)
gabsource Mar 31, 2016
a09268f
Merge pull request #470 from gabsource/master
JeffreyWay Mar 31, 2016
28b50a0
Lazy load some dependencies
JeffreyWay Mar 31, 2016
b9091b4
Replace css-nano with clean-css - closes #460
JeffreyWay Mar 31, 2016
d4c572a
Call minify function properly
JeffreyWay Mar 31, 2016
803dcdd
Refactoring
JeffreyWay Apr 1, 2016
cfd12d8
Autoprefixing defaults to > 1% of browsers now
JeffreyWay Apr 1, 2016
9b35c63
Clean up the main Elixir function
JeffreyWay Apr 1, 2016
5e5f7f7
Use new minifier
JeffreyWay Apr 1, 2016
cda960d
Just initialize the task collection with an empty array
JeffreyWay Apr 1, 2016
6671725
No need to bind
JeffreyWay Apr 1, 2016
0e8bb92
Update method name
JeffreyWay Apr 1, 2016
7e5b090
Remove unused variable
JeffreyWay Apr 1, 2016
48e208d
Remove unused plugin
JeffreyWay Apr 1, 2016
42e00b2
Reference batch through Elixir.Plugins
JeffreyWay Apr 1, 2016
7ed84af
Fix extend order for Browsersync options - closes #454
JeffreyWay Apr 1, 2016
2277fa8
Allow for disabling notifications - closes #313
JeffreyWay Apr 1, 2016
dcbb363
Make tests green
JeffreyWay Apr 1, 2016
aaae364
Working on conversion to ES6
JeffreyWay Apr 4, 2016
03eb8b7
Add npmignore
JeffreyWay Apr 4, 2016
4a73b1e
ES6 conversion work
JeffreyWay Apr 4, 2016
d7bb8ad
Add dist/ to gitignore
JeffreyWay Apr 4, 2016
b4e3aec
Add tests for TaskCollection
JeffreyWay Apr 4, 2016
d3fffe5
Fix file name
JeffreyWay Apr 4, 2016
f58a83e
Compile on pre-publish
JeffreyWay Apr 4, 2016
011c260
Prettier formatting
JeffreyWay Apr 4, 2016
acc1e3f
v6 Release Candidate
JeffreyWay Apr 5, 2016
9e5eab7
Remove default CoffeeScript support
JeffreyWay Apr 5, 2016
e19a63d
Add test app folder to npmignore
JeffreyWay Apr 5, 2016
7401c58
v6rc2
JeffreyWay Apr 5, 2016
aac2fd1
Fix notification disabling
JeffreyWay Apr 5, 2016
538b7af
Update default.js
ricardogobbosouza Apr 21, 2016
7277749
Optimize images
vinkla Apr 22, 2016
e2a6cc2
Move changelog to its own file
vinkla Apr 22, 2016
e3d31e9
Update npm dependencies
vinkla Apr 22, 2016
d2b581a
Merge pull request #485 from vinkla/optimize
JeffreyWay Apr 27, 2016
11093a5
Merge pull request #486 from vinkla/changelog
JeffreyWay Apr 27, 2016
8a5b3b6
Merge pull request #483 from ricardogobbosouza/patch
JeffreyWay Apr 27, 2016
4c47a51
Merge branch 'deps' of https://github.com/vinkla/elixir into vinkla-deps
JeffreyWay Apr 27, 2016
14b6d30
Merge branch 'vinkla-deps'
JeffreyWay Apr 27, 2016
7f432c2
Remove CoffeeScript test
JeffreyWay Apr 27, 2016
d75e8d2
Add Sublime files to gitignore
JeffreyWay Apr 27, 2016
4e44c49
Small fixes
JeffreyWay Apr 27, 2016
30271c9
Remove mix.rubySass
JeffreyWay Apr 27, 2016
e1a732d
Fix issue where plugins are not loaded properly - closes #491
JeffreyWay Apr 29, 2016
4ec2556
This missing period is annoying me.
JeffreyWay Apr 30, 2016
6c5a509
Add top-level isWatching method
JeffreyWay May 13, 2016
2fb30b0
Move methods around
JeffreyWay May 13, 2016
0e5cc8a
Little refactor
JeffreyWay May 13, 2016
e06e980
ES6 functions - because reasons
JeffreyWay May 13, 2016
597ded9
Switch to isWatching call
JeffreyWay May 13, 2016
7ea9b1b
Add initial event hook support
JeffreyWay May 13, 2016
cb89e29
Remove unused dependency
JeffreyWay May 13, 2016
b42eb4d
Pre-release 6.0.0-2
JeffreyWay May 13, 2016
23bb2d6
Send Gulp and plugins through to task
JeffreyWay May 13, 2016
4015391
Cleaning up some things
JeffreyWay May 15, 2016
accba58
Remove Browserify
JeffreyWay May 18, 2016
74bb763
Use Rollup and Buble for module bundling
JeffreyWay May 19, 2016
d8c2aed
Use Webpack instead
JeffreyWay May 19, 2016
58c2149
Add Webpack sourcemap support
JeffreyWay May 19, 2016
c400777
Gulp watch now triggers the whole suite immediately.
JeffreyWay May 19, 2016
d9774bb
Tweak webpack version
JeffreyWay May 19, 2016
ef378cc
Make loaders configurable
JeffreyWay May 19, 2016
d8b52e7
Move setup work into bootstrap files
JeffreyWay May 19, 2016
3f8c35e
Make Elixir and gulp available to all tasks
JeffreyWay May 19, 2016
b75163b
Don't pass Gulp to task definition
JeffreyWay May 19, 2016
b2e07b1
Remove unnecessary concat
JeffreyWay May 19, 2016
3f84cfb
Allow logging to be disabled for tests
JeffreyWay May 19, 2016
2c341b2
Add mix.compress + tests
JeffreyWay May 19, 2016
6f8caf0
Extend default Webpack options
JeffreyWay May 19, 2016
5cd0a6c
No need to pass Elixir to Task module
JeffreyWay May 19, 2016
aafb354
Extract method
JeffreyWay May 20, 2016
80429d6
Refactor logger
JeffreyWay May 20, 2016
50ee15b
Automatically import webpack.config.js if present.
JeffreyWay May 20, 2016
996c91d
No need let buble
ricardogobbosouza May 20, 2016
991a0ad
mix.combine requires an output path.
JeffreyWay May 20, 2016
ab04b64
Make file parser function globally available
JeffreyWay May 20, 2016
c9f4fba
mix.compress requires a full output path
JeffreyWay May 20, 2016
f5f2456
Merge pull request #514 from ricardogobbosouza/master
JeffreyWay May 20, 2016
075f1af
No need to watch. Webpack will do it.
JeffreyWay May 20, 2016
5641ec2
Merge mix.combine() and mix.compress()
JeffreyWay May 20, 2016
ca8861a
Make tests green
JeffreyWay May 20, 2016
afc9252
Remove some Gulp duplication
JeffreyWay May 21, 2016
6be3d70
Export at bottom
JeffreyWay May 21, 2016
99f7e22
Use Compiler class for common compilers.
JeffreyWay May 22, 2016
4bad253
Add CSS and JS compiler classes
JeffreyWay May 22, 2016
3c05ae5
Remove unused file
JeffreyWay May 22, 2016
870e5af
Formatting
JeffreyWay May 22, 2016
c045f27
Two line breaks between methods
JeffreyWay May 22, 2016
6bbec82
Remove space
JeffreyWay May 22, 2016
2513d85
Add an inProduction prop to main Elixir object
JeffreyWay May 22, 2016
e33ca3b
Pretty formatting matters, yo
JeffreyWay May 22, 2016
7355e42
Formatting
JeffreyWay May 22, 2016
4c50884
Move method to subclass
JeffreyWay May 22, 2016
e390bdd
Add task name to error message
JeffreyWay May 22, 2016
84c824b
Check param name
JeffreyWay May 22, 2016
a4dafe9
Formatting
JeffreyWay May 22, 2016
5cef997
Needs to be regular function keyword
JeffreyWay May 22, 2016
84bcc79
Revert back to regular function
JeffreyWay May 22, 2016
5b0a2cb
Cleaning up some things
JeffreyWay May 22, 2016
ae77642
Minor style guide fix
JeffreyWay May 26, 2016
48048a5
add filter method
recca0120 May 26, 2016
b20e61e
Refactor PHPUnit + PHPSpec tasks
JeffreyWay May 26, 2016
f201410
Swap TestingCompiler with Task subclass
JeffreyWay May 26, 2016
65fb33f
Move other compilers over to Task subclasses
JeffreyWay May 26, 2016
ff3f2b7
Docblocks
JeffreyWay May 26, 2016
46b77a5
Remove deprecated method
JeffreyWay May 26, 2016
69d67ff
Use saveAs method
JeffreyWay May 27, 2016
8bed054
gulp.src('') isn't recommended
JeffreyWay May 27, 2016
5765dc2
Merge pull request #523 from recca0120/patch-1
JeffreyWay May 27, 2016
26115a6
Fix import class
JeffreyWay May 29, 2016
9cd9dd9
Fix error handling when compiling CSS and JS
thecrypticace May 29, 2016
0e5c1e0
Fix error with CSS minification
thecrypticace May 30, 2016
cbcbd50
Merge pull request #527 from thecrypticace/patch-3
JeffreyWay May 30, 2016
b5d0e1e
Merge pull request #526 from thecrypticace/patch-2
JeffreyWay May 30, 2016
3b5c62a
Don't override existing extensions
JeffreyWay May 31, 2016
c3e3baf
Update Browserify deprecated message
JeffreyWay May 31, 2016
a35accc
Add CoffeeScript deprecation
JeffreyWay May 31, 2016
562c5cb
Fix an issue with gulp watch not running properly
JeffreyWay Jun 1, 2016
c45c534
Check for plugin in configuration file as fallback
JeffreyWay Jun 1, 2016
dc2ddc2
Catch JS minifier errors
thecrypticace Jun 2, 2016
671305e
Merge pull request #531 from thecrypticace/patch-4
JeffreyWay Jun 2, 2016
7741dc9
Handle minification errors
JeffreyWay Jun 2, 2016
c341461
Use "this"
JeffreyWay Jun 2, 2016
01c89b1
Working on prettier logging
JeffreyWay Jun 2, 2016
5196fae
Removed old import
JeffreyWay Jun 2, 2016
8dc2848
Adjusting folder structure
JeffreyWay Jun 2, 2016
65249c4
Change file name and references
JeffreyWay Jun 2, 2016
37e901a
Fix paths
JeffreyWay Jun 2, 2016
3bd3d9a
Add console reporting
JeffreyWay Jun 2, 2016
8658af2
Be more consistent about unhappy path first
JeffreyWay Jun 2, 2016
0e9f7aa
Change heading
JeffreyWay Jun 3, 2016
2b0332f
Swap log out with record
JeffreyWay Jun 3, 2016
7b0201a
Space after class
JeffreyWay Jun 3, 2016
5463887
Notification methods can be static
JeffreyWay Jun 3, 2016
f1f410e
Simplify method checks
JeffreyWay Jun 3, 2016
53b92d7
Cleaning up a couple things
JeffreyWay Jun 3, 2016
a0cefa8
Create dedicated class for Gulp builder
JeffreyWay Jun 3, 2016
e1bc6c3
Change Logger to Log
JeffreyWay Jun 3, 2016
f9c026d
Export correct class name
JeffreyWay Jun 3, 2016
2d9170d
Rename task.js to Task.js
JeffreyWay Jun 3, 2016
4b22b1b
Refactor task description naming
JeffreyWay Jun 3, 2016
0c3099d
Merge branch 'master' of github.com:laravel/elixir
JeffreyWay Jun 3, 2016
cf84f3d
Record step instead of log
JeffreyWay Jun 6, 2016
193a813
Record steps for version task
JeffreyWay Jun 6, 2016
ecf16fe
No need to new up
JeffreyWay Jun 6, 2016
02ff9d3
Trigger all tests on "gulp tdd"
JeffreyWay Jun 6, 2016
ac2b290
Clear out all steps after the summary is prepared
JeffreyWay Jun 6, 2016
b952cb8
Update Task.js
ricardogobbosouza Jun 6, 2016
4156b0a
Update CssTask.js
ricardogobbosouza Jun 6, 2016
23121b9
Merge pull request #534 from ricardogobbosouza/master
JeffreyWay Jun 6, 2016
a0daa5b
Normalize paths
JeffreyWay Jun 7, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "presets": ["es2015"] }
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{json,yml}]
indent_size = 2
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.idea/
node_modules/
npm-debug.log
npm-debug.log
todo.txt
dist/
*.sublime-*
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/
elixir-test-app/
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Changelog

### 5.0.0

- Added support for overriding the default Uglify configuration.
- Fixed an issue where passing a negated path (to ignore a file) causes an assertion here.
- In order to allow Watchify to use the Browserify cache for fast rebuilds, default `cache` and `packageCache` configuration options have been added.
- **Breaking:** Removed `gulp-phpunit` and `gulp-phpspec`, in favor of piping to a simple shell script. If you are running `mix.phpUnit()` or `mix.phpSpec()`, please note [the argument adjustment](https://github.com/laravel/elixir/commit/5fa4b861a6950479300d5d8883b4ee93760e566a): `mix.phpUnit(src, command)` and `mix.phpSpec(src, command)`, respectively.

### 4.2.1

- Remove all unsafe optimizations performed by the [cssnano](http://cssnano.co/options/) plugin. You may re-enable these by updating your config: `Elixir.config.css.cssnano.pluginOptions.safe = false`.

### 4.2
- Added `mix.exec(command, watchPath)` method. If you've ever needed to trigger a shell command as part of your compile process, you'll be happy to see this. Try out `mix.exec('say "Hello there"')` for an example.
- Swapped out the "gulp-minify-css" plugin (now deprecated) with the recommended "gulp-cssnano". If you were manually overriding any Elixir options for "gulp-minify-css", please update them for "gulp-cssnano". This likely won't affect you otherwise.

### 4.1

- Added `mix.combine([src], outputPath)` method. This is useful in the instance where you want to concatenate an array of files, without running any unnecessary and slow compilation (Uglify, Sourcemaps, etc.). You'll frequently use this for combining pre-minified libraries and such.
89 changes: 0 additions & 89 deletions Config.js

This file was deleted.

17 changes: 0 additions & 17 deletions Gulpfile.example.js

This file was deleted.

7 changes: 7 additions & 0 deletions elixir-test-app/compress/file.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.one {
color: red;
}

.two {
color: red;
}
2 changes: 2 additions & 0 deletions elixir-test-app/compress/file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var foo;
var bar;
1 change: 1 addition & 0 deletions elixir-test-app/compress/file2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var baz;
1 change: 1 addition & 0 deletions elixir-test-app/copy/bar/bar.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bar
1 change: 1 addition & 0 deletions elixir-test-app/copy/foo/foo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo
1 change: 1 addition & 0 deletions elixir-test-app/resources/assets/coffee/module.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
class MyModule
3 changes: 3 additions & 0 deletions elixir-test-app/resources/assets/css/one.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.one {
color: red;
}
3 changes: 3 additions & 0 deletions elixir-test-app/resources/assets/css/two.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.two {
color: pink;
}
1 change: 1 addition & 0 deletions elixir-test-app/resources/assets/js/lib1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var somelib;
1 change: 1 addition & 0 deletions elixir-test-app/resources/assets/js/lib2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var anotherlib;
3 changes: 3 additions & 0 deletions elixir-test-app/resources/assets/sass/another.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.another {
color: green;
}
3 changes: 3 additions & 0 deletions elixir-test-app/resources/assets/sass/app.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.app {
color: red;
}
66 changes: 66 additions & 0 deletions elixir-test-app/test/GulpPaths.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
var expect = require('chai').expect;
var GulpPaths = require('laravel-elixir').GulpPaths;

describe('Gulp Paths', function() {
var paths;

beforeEach(() => paths = new GulpPaths());

it('fetches all files, if a directory is provided for the source', () => {
paths = paths.src('some/src');

expect(paths.src.path).to.equal('some/src/**/*');
});

it('fetches all files, if an item in array is a directory', () => {
paths = paths.src(['some/file.txt', 'some/src']);

expect(paths.src.path).to.eql(['some/file.txt', 'some/src/**/*']);
});

it('uses the src file name as the output name, if an output file is not set', () => {
paths.src('src.scss').output('some/output', 'output.css');

expect(paths.output.path).to.equal('some/output/src.css');
});

it('uses a default output name if no alternative is available', () => {
paths.src(['file.scss']).output('some/output', 'output.css');

expect(paths.output.path).to.equal('some/output/output.css');
});

it('prefixes a base directory', () => {
expect(
paths.prefix('some/path', 'some/prefix')
).to.equal('some/prefix/some/path');

expect(
paths.prefix(['one/path', 'second/path'], 'some/prefix')
).to.eql(['some/prefix/one/path', 'some/prefix/second/path']);

// For any path beginning with a period, it's assumed that the
// user wants to ignore the prefix, and begin with the project
// root.
expect(
paths.prefix('./resources/custom/file.scss', 'some/prefix')
).to.equal('./resources/custom/file.scss');
});

it('changes an extension', () => {
expect(
paths.changeExtension('some/path/foo.txt', '.png')
).to.equal('some/path/foo.png');
});

it('parses a file path', () => {
var parsed = paths.parse('foo/bar/path/file.txt');

expect(parsed.path).to.equal('foo/bar/path/file.txt');
expect(parsed.name).to.equal('file.txt');
expect(parsed.extension).to.equal('.txt');
expect(parsed.isDir).to.be.false;
expect(parsed.baseDir).to.equal('foo/bar/path');
});

});
68 changes: 68 additions & 0 deletions elixir-test-app/test/TaskCollection.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
var expect = require('chai').expect;

import Elixir from 'laravel-elixir';
import TasksCollection from 'laravel-elixir/src/TaskCollection';

let Task = Elixir.Task;

describe('Task Collection', function() {
let taskOne, taskTwo, taskThree, tasks;

beforeEach(() => {
taskOne = new Task('foo');
taskTwo = new Task('bar');
taskThree = new Task('foo');

tasks = new TasksCollection([taskOne, taskTwo, taskThree]);
});

it('fetches all tasks', () => {
expect(tasks.all()).to.have.length(3);
});

it('knows if it has a task with the given name', () => {
expect(tasks.has('foo')).to.be.true;
expect(tasks.has('baz')).to.be.false;
});

it('pushes a new task onto the collection', () => {
tasks.push(new Task('baz'));

expect(tasks.all()).to.have.length(4);
});

it('can cycle through all tasks', () => {
let count = 0;

tasks.forEach(() => count++);

expect(count).to.eql(3);
});

it('plucks the names of each task', () => {
expect(tasks.names()).to.eql(['foo', 'bar', 'foo']);
});

it('filters all tasks with a where condition', () => {
expect(tasks.where({ isComplete: true })).to.be.empty;
expect(tasks.where({ isComplete: false })).to.have.length(3);
});

it('find all tasks with the given name', () => {
expect(tasks.byName('foo')).to.have.length(2);
});

it('finds all incomplete tasks with the given name', () => {
expect(tasks.findIncompleteByName('foo')).to.have.length(2);

taskOne.isComplete = true;

expect(tasks.findIncompleteByName('foo')).to.have.length(1);
});

it('empties the underlying list of tasks', () => {
tasks.empty();

expect(tasks.all()).to.be.empty;
});
});
Loading