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

use browserify-shim to load some deps from CDNs #320

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ahdinosaur
Copy link
Member

@ahdinosaur ahdinosaur commented Aug 14, 2016

allows us to load some client-side code in parallel from super fast sources.

so far only done angular, angular-material, angular-material-icons, and jquery. this shows how we could do more as we wish.

allows us to load some client-side code in parallel from super fast sources.

so far only done `angular`, `angular-material`, `angular-material-icons`, and `jquery`. this shows how we could do more as we wish.
@gardner
Copy link
Member

gardner commented Aug 16, 2016

I did:

rm -rf node_modules
npm i
gulp build

Which produces the output:

gardner@sneaker:~/src/cobudget-ui (shims *)$ gulp build 
[19:47:56] Using gulpfile ~/src/cobudget-ui/gulpfile.js
[19:47:56] Starting 'scripts-build'...
[19:47:56] Starting 'styles-build'...
[19:47:56] Starting 'html-build'...
[19:47:56] Starting 'assets-build'...
[19:47:56] Finished 'assets-build' after 3.16 ms
[19:47:56] Finished 'html-build' after 88 ms
[19:47:57] browserify error { [Error: Cannot find module 'app' from '/Users/gardner/src/cobudget-ui']

executing git status shows node_modules/app is missing

gardner@sneaker:~/src/cobudget-ui (shims *)$ git status
On branch shims
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    deleted:    node_modules/app

@data-doge
Copy link
Contributor

data-doge commented Aug 16, 2016

@Connoropolous i think u experienced this before too? how did u fix this again?

@Connoropolous
Copy link

@&#& it's buried in your and my slack chat behind the 10K limit Eugene. I'll try and remember

@Connoropolous
Copy link

Ooo, Gardner: don't do rm -rf on node_modules because: https://github.com/cobudget/cobudget-ui/tree/master/node_modules

@Connoropolous
Copy link

Anyways all that has nothing to do with this PR, besides being an issue you encountered while trying to test it :)

@gardner
Copy link
Member

gardner commented Aug 16, 2016

node_modules is generally in .gitignore. @ahdinosaur can you talk about the reasoning behind commit 3bfee8b?

@ahdinosaur
Copy link
Member Author

ahdinosaur commented Aug 17, 2016

@gardner it let's you do require('app') or require('app/something'), which i find really awesome. more info on how require works: art-of-node#how-require-works

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants