Last active
November 16, 2018 14:46
-
-
Save aymericbeaumet/7e7ef5e31e17cff60a1d to your computer and use it in GitHub Desktop.
Revisions
-
aymericbeaumet revised this gist
Oct 7, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ { "private": true, "homepage": "https://aymericbeaumet.com/properly-shim-angularjs-applications-using-browserify", "author": "Aymeric Beaumet", "license": "UNLICENSE", "scripts": { -
aymericbeaumet revised this gist
Oct 7, 2018 . No changes.There are no files selected for viewing
-
aymericbeaumet revised this gist
May 30, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ { "private": true, "homepage": "https://aymericbeaumet.com/properly-shim-angularjs-applications-using-browserify/", "author": "Aymeric Beaumet", "license": "UNLICENSE", "scripts": { -
aymericbeaumet revised this gist
May 30, 2016 . No changes.There are no files selected for viewing
-
aymericbeaumet revised this gist
Feb 12, 2016 . No changes.There are no files selected for viewing
-
aymericbeaumet revised this gist
Feb 9, 2016 . No changes.There are no files selected for viewing
-
aymericbeaumet revised this gist
Mar 12, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ { "private": true, "homepage": "http://aymericbeaumet.me/properly-shim-angularjs-applications-using-browserify/", "author": "Aymeric Beaumet", "license": "UNLICENSE", "scripts": { -
aymericbeaumet revised this gist
Mar 4, 2015 . 5 changed files with 31 additions and 34 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,3 @@ node_modules/ npm-debug.log bundle.js This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,3 @@ ```bash npm install npm run build This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,14 @@ var angular = require('angular'); var app = angular.module('app', [ require('angular-local-storage'), ]); app.run(function(localStorageService) { if (!localStorageService.get('lastVisit')) { angular.element('body').text('Hello stranger!'); } else { angular.element('body').text('Welcome back!'); } localStorageService.set('lastVisit', Date.now()); }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,7 @@ <html> <head> <script src="bundle.js"></script> </head> <body ng-app="app"> </body> </html> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,39 +1,37 @@ { "private": true, "homepage": "http://aymeric.guru/properly-shim-angularjs-applications-using-browserify/", "author": "Aymeric Beaumet", "license": "UNLICENSE", "scripts": { "build": "browserify app.js -o bundle.js" }, "dependencies": { "angular": "1.3.14", "angular-local-storage": "0.1.5", "jquery": "2.1.3" }, "browser": { "angular": "./node_modules/angular/angular.js", "angular-local-storage": "./node_modules/angular-local-storage/dist/angular-local-storage.js" }, "browserify-shim": { "angular": { "depends": "jquery:jQuery", "exports": "angular" }, "angular-local-storage": { "depends": "angular", "exports": "angular.module('LocalStorageModule').name" } }, "browserify": { "transform": [ "browserify-shim" ] }, "devDependencies": { "browserify": "9.0.3", "browserify-shim": "3.8.3" } } -
aymericbeaumet revised this gist
Dec 16, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ From: http://aymeric.guru/properly-shim-angularjs-applications-using-browserify/ ```bash npm install -
aymericbeaumet revised this gist
Nov 28, 2014 . 1 changed file with 4 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,24 +2,21 @@ "author": "Aymeric Beaumet", "license": "ISC", "scripts": { "build": "browserify app.js -o build.js" }, "dependencies": { "angular": "^1.3.4", "angular-cookies": "^1.3.4", "angular-ui-router": "^0.2.11", "jquery": "^2.1.1" }, "browser": { "angular": "./node_modules/angular/angular.js", "angular-cookies": "./node_modules/angular-cookies/angular-cookies.js" }, "devDependencies": { "browserify": "^6.0.3", "browserify-shim": "^3.8.0" }, "browserify": { "transform": [ -
aymericbeaumet created this gist
Oct 12, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ node_modules/ build.js This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ From: http://aymericbeaumet.me/blog/properly-shim-angular-in-browserify ```bash npm install npm run build open index.html ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ 'use strict'; var angular = require('angular'); var app = angular.module('app', [ require('angular-cookies'), require('angular-ui-router') ]) ; app.run(function($window) { $window.alert('Running!'); }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ <html> <head> <title>Angular + Angular modules shimming</title> </head> <body ng-app="app"> <p>You should see an alert.</p> <script async src="build.js"></script> </body> </html> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ { "author": "Aymeric Beaumet", "license": "ISC", "scripts": { "postinstall": "napa", "build": "browserify app.js -o build.js" }, "dependencies": { "angular": "^1.2.23", "angular-ui-router": "^0.2.11", "jquery": "^2.1.1" }, "napa": { "angular-cookies": "angular/bower-angular-cookies#v1.2.23" }, "browser": { "angular-cookies": "./node_modules/angular-cookies/angular-cookies.js" }, "devDependencies": { "browserify": "^6.0.3", "browserify-shim": "^3.8.0", "napa": "^1.0.1" }, "browserify": { "transform": [ "browserify-shim" ] }, "browserify-shim": { "angular": { "depends": "jquery:jQuery", "exports": "angular" }, "angular-cookies": { "depends": "angular", "exports": "angular.module('ngCookies').name" }, "angular-ui-router": { "depends": "angular" } } }