Skip to content

Commit

Permalink
Merge pull request #11 from elephfront/semicolumn-option
Browse files Browse the repository at this point in the history
Make the trailing semi-column optional
  • Loading branch information
HavokInspiration authored Jul 7, 2017
2 parents eda79c8 + 6b81f2c commit ee0680b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: php

php:
- 7.1
- nightly

sudo: false

Expand All @@ -12,6 +13,7 @@ env:
matrix:
allow_failures:
- env: CODECOVERAGE=1 DEFAULT=0
- php: nightly

fast_finish: true

Expand Down
2 changes: 1 addition & 1 deletion src/Task/ImportJavascript.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ImportJavascript extends BaseTask implements TaskInterface
*
* @var string
*/
const IMPORT_PATTERN = '/roboimport\(\'(.*)\'\);/';
const IMPORT_PATTERN = '/roboimport\(\'(.*)\'\);?/';

/**
* List of the destinations files mapped by the sources name. One source equals one destination.
Expand Down
4 changes: 3 additions & 1 deletion tests/app/js/imports/nesting.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// This is the first level of nesting

roboimport('nested/deeper');
roboimport('nested/deeper');
roboimport('bogus')
roboimport('../simple');
2 changes: 1 addition & 1 deletion tests/app/js/nested.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This the root of the nesting chain

roboimport('imports/nesting');
roboimport('imports/nesting')
4 changes: 3 additions & 1 deletion tests/comparisons/testNestedImport.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

// This is the depth before the last

// This is the bottom on the nested import chain
// This is the bottom on the nested import chain
// Some bogus JS code goes here
// Some bogus JS code goes here

0 comments on commit ee0680b

Please sign in to comment.