Skip to content

Conversation

@jdungan
Copy link
Member

@jdungan jdungan commented Apr 8, 2017

Another refactor to speed up load time. It work but comes with a recursive promise chain -- looking forward to a good discussion before merging.

combined tasks:
* gulp dev-packed - creates addon packages and watches for changes
* gulp dev-unpacked - creates directories with addon files and watches all for changes
3. See the list of gulp tasks build or watch changes to files and compile extensions:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With dev tasks removed from the doc, we need to change the lines below that say "Run one of the dev-___ tasks above".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does 382d507 fix this?

}
javascript_src = function({source, destination}) {
return function() {
console.log(`gather src ${source}/*.js files`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, my vim syntax highlighter hates this /* part now. It thinks that it's commenting out the entire file after this.

src/issue.js Outdated
scrolling: "no",
seamless: "seamless"
}
const make_widget_appender = (domain) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a rhyme or reason for using arrow functions vs. declared functions? (e.g., make_widget_appender vs. on_github_pages)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

artistic license? Actually, I'm settling on named functions if it longer than one line.

#### publish-{browser}-file
* **publish-firefox-file**: create xpi for FF prod
* **publish-chrome-file**: create zip for chrome and opera
* **publish-all**: creates all browser extension files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I try to run any of these gulp tasks, I get:

Error: Task requires a name that is a string
    at Gulp.Orchestrator.add (/Users/lcrouch/code/codesy/widgets/node_modules/orchestrator/index.js:41:10)
    at Object.<anonymous> (/Users/lcrouch/code/codesy/widgets/gulpfile.js:146:10)
    at Module._compile (module.js:573:32)
    at Object.Module._extensions..js (module.js:582:10)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Function.Module._load (module.js:441:3)
    at Module.require (module.js:500:17)
    at require (internal/module.js:20:19)
    at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d580d3a should fix this.

@groovecoder
Copy link
Member

Still getting errors during gulp ...

groovecoder:widgets lcrouch$ gulp workon-firefox-directory

/Users/lcrouch/code/codesy/widgets/gulpfile.js:44
javascript_src = function({source, destination}) {
                          ^
SyntaxError: Unexpected token {
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)
    at Liftoff.<anonymous> (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:181:16)
    at module.exports (/usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/flagged-respawn/index.js:17:3)
    at Liftoff.<anonymous> (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:174:9)
groovecoder:widgets lcrouch$ gulp workon-chrome-directory

/Users/lcrouch/code/codesy/widgets/gulpfile.js:44
javascript_src = function({source, destination}) {
                          ^
SyntaxError: Unexpected token {
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)
    at Liftoff.<anonymous> (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:181:16)
    at module.exports (/usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/flagged-respawn/index.js:17:3)
    at Liftoff.<anonymous> (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:174:9)
groovecoder:widgets lcrouch$

@jdungan
Copy link
Member Author

jdungan commented Apr 15, 2017

hmm? gulp workon-chrome-directory is working for me.

}

when_installed = ({reason}) => {
when_installed ({reason}) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be:

function when_installed({reason}) {
...
}

@groovecoder groovecoder merged commit bdc4aee into master Apr 15, 2017
@groovecoder groovecoder deleted the promisy-fun branch April 15, 2017 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants