Skip to content

Commit

Permalink
Bootstrap Webpack configuration
Browse files Browse the repository at this point in the history
Fix Angular template compilation

Add missing Code Mirror extensions

Fix CSS generation

Fix last icon paths issues
  • Loading branch information
jpetitcolas committed May 18, 2015
1 parent db10369 commit ffd64bd
Show file tree
Hide file tree
Showing 31 changed files with 721 additions and 983 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ build/ng-admin.css
src/css
examples/blog/build
examples/blog/assets
npm-debug.log
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ module.exports = function (grunt) {
options: {
port: 8000,
base: 'examples/blog/',
keepalive: false,
livereload: true
keepalive: true,
livereload: false
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.PHONY: build

watch:
./node_modules/webpack-dev-server/bin/webpack-dev-server.js --progress --colors --host=0.0.0.0

install:
bower install
npm install
Expand Down
1 change: 0 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"jquery": "~1.11.0",
"json3": "~3.2.6",
"jsonlint": "~1.6.0",
"ng-file-upload": "~2.2.2",
"ngInflection": "~1.0.0",
"nprogress": "~0.1.6",
"requirejs": "~2.1.14",
Expand Down
8 changes: 0 additions & 8 deletions build/ng-admin.min.css

This file was deleted.

21 changes: 0 additions & 21 deletions build/ng-admin.min.js

This file was deleted.

1 change: 0 additions & 1 deletion build/ng-admin.min.map

This file was deleted.

5 changes: 2 additions & 3 deletions examples/blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
<meta charset="utf-8">
<title>Angular admin</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="build/ng-admin.css">
<script src="build/angular.js" type="text/javascript"></script>
<script src="build/ng-admin.js" type="text/javascript"></script>
<link rel="stylesheet" href="http://localhost:8080/build/ng-admin.min.css">
<script src="http://localhost:8080/build/ng-admin.min.js" type="text/javascript"></script>
<script src="config.js" type="text/javascript"></script>
</head>
<body ng-app="myApp" ng-strict-di>
Expand Down
18 changes: 4 additions & 14 deletions examples/blog/stub-server.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,19 +153,9 @@
],
"category": "tech",
"subcategory": "computers",
"pictures": null
},
{
"id": 12,
"title": "Qui tempore rerum et voluptates",
"teaser": "Occaecati rem perferendis dolor aut numquam cupiditate. At tenetur dolores pariatur et libero asperiores porro voluptas. Officiis corporis sed eos repellendus perferendis distinctio hic consequatur.",
"body": "<p>Praesentium corrupti minus molestias eveniet mollitia. Sit dolores est tenetur eos veritatis. Vero aut molestias provident ducimus odit optio.</p><p>Minima amet accusantium dolores et. Iste eos necessitatibus iure provident rerum repellendus reiciendis eos. Voluptate dolorem dolore aliquid sed maiores.</p><p>Ut quia excepturi quidem quidem. Cupiditate qui est rerum praesentium consequatur ad. Minima rem et est. Ut odio nostrum fugit laborum. Quis vitae occaecati tenetur earum non architecto.</p><p>Minima est nobis accusamus sunt explicabo fuga. Ut ut ut officia labore ratione animi saepe et.</p><p>Accusamus quae ex rerum est eos nesciunt et. Nemo nam consequatur earum necessitatibus et. Eum corporis corporis quia at nihil consectetur accusamus. Ea eveniet et culpa maxime.</p><p>Et et quisquam odio sapiente. Voluptas ducimus beatae ratione et soluta esse ut animi. Ipsa architecto veritatis cumque in.</p><p>Voluptatem dolore sint aliquam excepturi. Pariatur quisquam a eum. Aut et sit quis et dolorem omnis. Molestias id cupiditate error ab.</p><p>Odio ut deleniti incidunt vel dolores eligendi. Nemo aut commodi accusamus alias reprehenderit dolorum eaque. Iure fugit quis occaecati aspernatur tempora iste.</p><p>Omnis repellat et sequi numquam accusantium doloribus eum totam. Ab assumenda facere qui voluptate. Temporibus non ipsa officia. Corrupti omnis ut dolores velit aliquam ut omnis consequuntur.</p><p>Et et non dolores itaque nesciunt reiciendis fuga quod. Quia voluptate repellat consequatur cupiditate et sint quis.</p><p>Quidem est nihil odit deleniti ab. Perspiciatis odit modi et aut et dolor.</p><p>Architecto velit et ipsam deserunt. Nostrum non fuga voluptatibus dolore rerum. Vitae consequuntur qui dolor laborum.</p><p>Atque iusto neque voluptatem aut neque. Necessitatibus at quas consectetur rerum ipsum. Et ullam aut velit.</p><p>Ad et nobis voluptatem et voluptatem cum facilis unde. Qui qui ratione dolores necessitatibus doloribus. Tempore aut consequatur ea optio. Eaque sunt recusandae expedita quaerat excepturi. Autem ipsum aliquid at porro perspiciatis.</p><p>Enim magni voluptatibus sunt et quos facilis recusandae id. Voluptatem autem exercitationem ut maxime eaque corporis aut. Vel quas accusamus voluptatem est odio. Officiis temporibus iusto corporis quos sed non qui.</p><p>Architecto aut assumenda assumenda doloremque enim et. Aut totam alias sint ipsa. Nihil aut alias pariatur minus aut eos ut.</p><p>Vitae aut velit illum natus. Animi error nemo veritatis natus. Vel nulla veniam consequatur consequatur laboriosam incidunt minima. Id rem accusamus voluptatum modi et aut et.</p><p>Excepturi corporis omnis ipsam ipsam praesentium ipsa. Voluptas qui deleniti iusto mollitia vitae sequi. Dicta vero et eveniet delectus asperiores voluptatum ratione. Distinctio porro sunt qui ea.</p><p>Dignissimos tempora atque quaerat doloribus repellendus molestias eveniet. Consectetur sunt adipisci voluptate enim in. Rerum non ut optio nam nostrum est. Tempora et nihil sit pariatur. Eius minima sit earum sed alias vero dolorem.</p><p>Dolor deleniti ipsum et odit in laboriosam repellat consequatur. Et ipsum tenetur ipsum ut debitis quo. Sunt inventore aut tenetur eum facilis qui adipisci. Praesentium rerum occaecati nulla.</p><p>Voluptatem dignissimos odio repudiandae. Id et ut ut id nisi. Occaecati omnis blanditiis temporibus nobis nesciunt corrupti.</p><p>Eligendi cumque alias blanditiis est. Eum aperiam dolore iste. Qui velit eos voluptas ea quidem. Quia natus pariatur doloremque velit accusamus.</p><p>Aliquid quidem assumenda autem fuga corporis rerum. Qui aut officia voluptatem voluptas maxime molestias. Nostrum ab quasi et blanditiis iusto esse.</p><p>Rem expedita non sequi. Itaque molestiae et non tempore corrupti ullam quisquam modi. Ex in maxime architecto consequuntur minima quaerat voluptatem. Omnis est eius accusantium et ipsum dolore.</p><p>Suscipit harum aut eveniet saepe reprehenderit. Ipsa eaque distinctio nulla nam libero. Debitis architecto quasi quia magnam quia.</p><p>Fugit dolorum illum aut molestiae neque. Delectus non voluptate vero est debitis id. Vitae distinctio iste omnis aspernatur voluptatem vero. Quaerat recusandae rem repellat.</p><p>Dolorum praesentium voluptas et omnis qui commodi laborum. Dolorem nostrum repellat facilis consectetur ex. Repudiandae iusto quia numquam. Reprehenderit sint beatae error non.</p><p>Recusandae in eius quos et voluptas. Doloremque consequuntur laudantium vel nihil. Eligendi quis aut ducimus numquam.</p><p>Doloribus ea maxime voluptatem sit. Et ullam quo rerum quia necessitatibus sed impedit.</p><p>Facilis quisquam et sunt. Eum officiis dolorem enim sapiente voluptatem sunt. Eum sit quidem culpa veniam sit.</p><p>Excepturi saepe alias ut rerum. Non autem hic dignissimos vel quo qui quas unde. Unde ut minus id architecto.</p><p>Eveniet ipsum et non error et nemo. Magnam voluptates dolore tenetur velit deserunt cupiditate ut. Voluptas rerum sed aut distinctio. Eligendi quis id molestiae.</p><p>Voluptatem adipisci et est voluptatibus repudiandae molestiae distinctio. Quisquam enim aliquid veritatis. Iure eos velit quod commodi fugit molestiae.</p><p>Consequuntur et velit quia et deserunt officia ut. Pariatur et atque ut nulla saepe cum veritatis. Qui praesentium praesentium quos consequatur.</p>",
"views": 720,
"published_at": "2012-11-07",
"tags": [],
"category": "lifestyle",
"subcategory": "fitness",
"pictures": null
"pictures": {
"hello": "oks"
}
}
],
"comments": [
Expand Down Expand Up @@ -241,7 +231,7 @@
},
{
"id": 11,
"post_id": 1,
"post_id": 6,
"author": "Logan Schowalter",
"body": "I don't want to be?' it asked. 'Oh, I'm not Ada,' she said, 'and see whether it's marked \"poison\" or not'; for she had asked it aloud; and in despair she put her hand on the end of the.",
"created_at": "2012-08-05"
Expand Down
45 changes: 41 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,32 @@
"url": "git://github.com/marmelab/ng-admin.git"
},
"dependencies": {
"codemirror": "^5.2.0",
"core-js": "^0.6.1",
"humanize-plus": "^1.5.0",
"install": "^0.1.8",
"npm": "^2.7.0",
"npm": "^2.10.0",
"requirejs": "~2.1.14"
},
"devDependencies": {
"angular": "^1.3.15",
"angular-bootstrap": "^0.12.0",
"angular-file-upload": "^1.6.4",
"angular-numeraljs": "^1.1.6",
"angular-sanitize": "^1.3.15",
"angular-ui-codemirror": "^0.3.0",
"angular-ui-router": "^0.2.14",
"angularjs": "0.0.1",
"babel": "^4.6.0",
"babel-core": "^5.2.17",
"babel-loader": "^5.0.0",
"bootstrap-sass": "^3.3.4",
"chai": "^2.1.0",
"css-loader": "^0.12.0",
"exports-loader": "^0.6.2",
"extract-text-webpack-plugin": "^0.8.0",
"file-loader": "^0.8.1",
"font-awesome": "^4.3.0",
"grunt": "~0.4.4",
"grunt-babel": "^4.0.0",
"grunt-concurrent": "^0.5.0",
Expand All @@ -33,9 +50,11 @@
"grunt-karma": "^0.8.3",
"grunt-mocha-test": "^0.12.7",
"grunt-ng-annotate": "^0.10.0",
"grunt-protractor-runner": "^1.2.1",
"grunt-protractor-runner": "^1.1.4",
"humane-js": "^3.2.2",
"jasmine-core": "~2.1.3",
"jshint-stylish": "~0.1.3",
"jsonlint": "^1.6.2",
"karma": "~0.12.14",
"karma-babel-preprocessor": "^4.0.0",
"karma-chrome-launcher": "^0.1.4",
Expand All @@ -44,11 +63,29 @@
"karma-ng-scenario": "~0.1.0",
"karma-phantomjs-launcher": "^0.1.4",
"karma-requirejs": "~0.2.2",
"lodash": "^3.8.0",
"mocha": "^2.1.0",
"mocha-traceur": "^2.1.0",
"protractor": "~1.8.0",
"ng-annotate-webpack-plugin": "^0.1.2",
"ng-file-upload": "^2.2.0",
"nginflection": "^1.1.10",
"ngtemplate-loader": "^1.3.0",
"node-libs-browser": "^0.5.0",
"node-sass": "^2.1.1",
"nprogress": "^0.1.6",
"numeral": "^1.5.3",
"papaparse": "^4.1.1",
"rangy": "^1.3.0",
"restangular": "^1.5.1",
"sinon": "~1.14.1",
"superagent": "^0.18.2"
"sass-loader": "^0.5.0",
"style-loader": "^0.12.2",
"superagent": "^0.18.2",
"textangular": "^1.3.11",
"underscore": "^1.8.3",
"url-loader": "^0.5.5",
"webpack": "^1.9.4",
"webpack-dev-server": "^1.8.2"
},
"engines": {
"node": ">=0.10.0"
Expand Down
73 changes: 9 additions & 64 deletions src/javascripts/ng-admin.js
Original file line number Diff line number Diff line change
@@ -1,68 +1,13 @@
/*global require,define,angular*/
require('./vendors.js');
require('./ng-admin/Main/MainModule');
require('./ng-admin/Crud/CrudModule');

define('angular', [], function () {
'use strict';
var Factory = require('./ng-admin/es6/lib/Factory');

return angular;
});

require.config({
paths: {
'angular-bootstrap': 'bower_components/angular-bootstrap/ui-bootstrap.min',
'angular-bootstrap-tpls': 'bower_components/angular-bootstrap/ui-bootstrap-tpls.min',
'angular-numeraljs': 'bower_components/angular-numeraljs/dist/angular-numeraljs',
'angular-resource': 'bower_components/angular-resource/angular-resource',
'angular-sanitize': 'bower_components/angular-sanitize/angular-sanitize',
'angular-ui-codemirror': 'bower_components/angular-ui-codemirror/ui-codemirror.min',
'angular-ui-router': 'bower_components/angular-ui-router/release/angular-ui-router',
'humane': 'bower_components/humane/humane',
'inflection': 'bower_components/inflection/inflection.min',
'lodash': 'bower_components/lodash/dist/lodash.min',
'ng-file-upload': 'bower_components/ng-file-upload/angular-file-upload',
'ngInflection': 'bower_components/ngInflection/ngInflection',
'nprogress': 'bower_components/nprogress/nprogress',
'numeral': 'bower_components/numeral/numeral',
'restangular': 'bower_components/restangular/dist/restangular',
'text' : 'bower_components/requirejs-text/text',
'textangular': 'bower_components/textAngular/dist/textAngular.min',
'CrudModule': 'ng-admin/Crud/CrudModule',
'papaparse': 'bower_components/papaparse/papaparse.min',
'MainModule': 'ng-admin/Main/MainModule',
'AdminDescription': '../../build/ng-admin-configuration'
},
shim: {
'papaparse': {
exports: 'Papa'
},
'restangular': {
deps: ['angular', 'lodash']
},
'angular-ui-router': {
deps: ['angular']
},
'angular-bootstrap': {
deps: ['angular']
},
'angular-bootstrap-tpls': {
deps: ['angular', 'angular-bootstrap']
}
}
});

define(function (require) {
'use strict';

var angular = require('angular');
require('MainModule');
require('CrudModule');

var AdminDescription = require('AdminDescription');

var factory = angular.module('AdminDescriptionModule', []);
factory.constant('AdminDescription', new AdminDescription());
var factory = angular.module('AdminDescriptionModule', []);
factory.constant('AdminDescription', new Factory());

var ngadmin = angular.module('ng-admin', ['main', 'crud', 'AdminDescriptionModule']);
ngadmin.config(['NgAdminConfigurationProvider', 'AdminDescription', function(NgAdminConfigurationProvider, AdminDescription) {
NgAdminConfigurationProvider.setAdminDescription(AdminDescription);
}]);
var ngadmin = angular.module('ng-admin', ['main', 'crud', 'AdminDescriptionModule']);
ngadmin.config(function(NgAdminConfigurationProvider, AdminDescription) {
NgAdminConfigurationProvider.setAdminDescription(AdminDescription);
});
Loading

0 comments on commit ffd64bd

Please sign in to comment.