File tree Expand file tree Collapse file tree 4 files changed +50
-0
lines changed Expand file tree Collapse file tree 4 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,19 @@ matrix:
6
6
- node_js : lts/* # Latest LTS
7
7
env : NPM_DEPLOY=true
8
8
- node_js : lts/carbon
9
+ env : DEMO=demo-node-8
9
10
- node_js : lts/boron # Minimum required
11
+ env : DEMO=demo-node-6
10
12
install :
11
13
- npm install --loglevel http # Prevent timeouts for inactivity
12
14
before_script :
15
+ - npm run build
13
16
- npm run lint
14
17
script :
15
18
- npm test -- --coverage
16
19
- ' [[ "$BUILD_DOCS" != true ]] || npm run doc' # Ensures ESDoc generation doesn't fail
17
20
- ' [[ "$REPORT_COVERAGE" != true ]] || codecov'
21
+ - node "${DEMO-demo}"
18
22
after_success : >
19
23
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$BUILD_DOCS" = "true" ]; then
20
24
bash <(curl -s https://gist.githubusercontent.com/amercier/9d41002c79ac8e9fbd36bc1815d934b1/raw/) amercier/files-by-directory;
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+
3
+ require ( '@babel/polyfill' ) ; // eslint-disable-line import/no-extraneous-dependencies
4
+ const filesByDirectory = require ( '.' ) ;
5
+
6
+ function invoke ( iterator , fn ) {
7
+ return iterator
8
+ . next ( )
9
+ . then ( ( { done, value } ) => done || Promise . resolve ( fn ( value ) ) . then ( ( ) => invoke ( iterator , fn ) ) ) ;
10
+ }
11
+
12
+ ( function main ( ) {
13
+ return invoke ( filesByDirectory ( [ './fixture/level1' ] ) , files => {
14
+ process . stdout . write ( `\n${ files . join ( '\n' ) } \n` ) ;
15
+ } ) ;
16
+ } ) ( ) . catch ( error => {
17
+ process . stdout . write ( `Error: ${ error . message } \n` ) ;
18
+ process . exit ( 1 ) ;
19
+ } ) ;
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+
3
+ require ( '@babel/polyfill' ) ; // eslint-disable-line import/no-extraneous-dependencies
4
+ const filesByDirectory = require ( '.' ) ;
5
+
6
+ ( async function main ( ) {
7
+ const iterator = filesByDirectory ( [ './fixture/level1' ] ) ;
8
+ // eslint-disable-next-line no-await-in-loop
9
+ for ( let item = await iterator . next ( ) ; ! item . done ; item = await iterator . next ( ) ) {
10
+ process . stdout . write ( `\n${ item . value . join ( '\n' ) } \n` ) ;
11
+ }
12
+ } ) ( ) . catch ( error => {
13
+ process . stdout . write ( `Error: ${ error . message } \n` ) ;
14
+ process . exit ( 1 ) ;
15
+ } ) ;
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+
3
+ const filesByDirectory = require ( '.' ) ;
4
+
5
+ ( async function main ( ) {
6
+ for await ( const files of filesByDirectory ( [ './fixture/level1' ] ) ) {
7
+ process . stdout . write ( `\n${ files . join ( '\n' ) } \n` ) ;
8
+ }
9
+ } ) ( ) . catch ( error => {
10
+ process . stdout . write ( `Error: ${ error . message } \n` ) ;
11
+ process . exit ( 1 ) ;
12
+ } ) ;
You can’t perform that action at this time.
0 commit comments