Git Product home page Git Product logo

ng-admin-demo's Introduction

archived Archived Repository
This code is no longer maintained. Feel free to fork it, but use it at your own risks.

ng-admin demo configuration

This is a demo of the ng-admin module for Angular.js. It creates a working administration for a fake poster shop named Posters Galore. You can test it online at http://marmelab.com/ng-admin-demo.

Posters Galore Administration

ng-admin usually requires a REST server to provide data. In this demo however, the REST server is simulated by the browser (using FakeRest). You can see the source data in data.js.

To explore the source code, start with js/main.js.

Installation

No installation needed to play with the demo. Just clone the repo, and open the index.html file.

Generating a new Dataset

The dataset is generated randomly. You can generate a new dataset with:

# update the data.js file
make data

To modify the data generator, start with dataGenerator/generate.js.

Tweaking The Admin

If you want to modify the admin configuration and see how it affects the admin, you'll need to install the build tools.

## install npm dependencies
make install
## run the server
make run

You can now open http://localhost:8080/webpack-dev-server/. Every change in the source will reload the page in the browser.

Pushing an update

You'll need to build the minified source before releasing a new version.

# update the files under build/
make build

License

ng-admin-demo is licensed under the MIT Licence, and sponsored by marmelab.

ng-admin-demo's People

Contributors

alexisjanvier avatar fzaninotto avatar jpetitcolas avatar kefir500 avatar kmaschta avatar nikhilnagpure30 avatar zyhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ng-admin-demo's Issues

Css is not getting loaded

Refused to apply style from 'http://localhost:8080/login.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
I am using node version 6.12.* with npm version 3.12. Not able to find out why it is happening.

require method

Hello,

I'm new to this kind of javascript.

I'm wondering, from which library you get the require method

For example, in main.js :
require('./customers/config')(nga, admin);

Thank you !

Pagination

Hello, I just found ng-admin, it very cool, but I have one notice. ng-admin-demo use data.js as huge data all-in-one place. Does ng-admin support pagination (with sort, search, prefetch next prev pages)? Does you have plans to add it?

reload entity

Hello guys, when i click side menu entity, it load the entity just one time, after it was loaded it never will be loaded again, until i press f5, there is one way it be loaded everytime that i click on menu or when i back from editView to listView?

E.g: if i create a item in createView() and back to listView the item that has been created is not shown. i have to refresh the website.

i'm not using fake server

Is it possible to build it / run it on windows?

When i type:

./node_modules/.bin/webpack  --progress --colors --devtool source-map

I get:

ERROR in ./~/admin-config/lib/Field/NumberField.js
Module parse failed: [PATH]\ng-admin-demo-gh-pages\node_modules\admin-config\lib\Field\NumberField.js Line 1: Unexpected token
You may need an appropriate loader to handle this file type.
| import Field from "./Field";
|
| class NumberField extends Field {
 @ ./js/types/AmountField.js 17:38-83

Using: windows / node 4.2.2 / npm 2.14.7

Demo source is outdated

I just wondered why it's using &filter instead of &_filters.
This is more a fyi for other people encountering this or other differences.
Not a big deal.

Angular.js: Error: Module 'MyApp' is not available

when I run this demo using "make run", it is OK!

but, when I open the browser (chrome), it can not display correctly, and the console display:
VM394 ng-admin.min.js:24
Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:nomod] Module 'myApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

can u help me?

run on windows

hello i'm not able to run it in a windows enviorement.
I allways get a blank page when i open index.html
what i'm doing wrong?

thanks

Problem with make run -> build folder not present in node_modules

Since today's release of ng-admin, build folder is no longer present in ng-admin, so makefile crashes

➜  ng-admin-demo git:(gh-pages) ✗ make run
cp: cannot stat './node_modules/ng-admin/build/ng-admin.min.js': No such file or directory
makefile:10: recipe for target 'copy-ng-admin' failed
make: *** [copy-ng-admin] Error 1

How to configure a connection MongoDB

Hello I'm starting to use ng-admin-demo. I want to know how to configure and customize a connection to the datasource mongodb instead of connecting to data.js. There are examples of this? Thanks

datastore._entries.name_of_var_<number>_X[0].values variable in datastore

I am trying to develop a workaround for a datastore variable. However, every time an entry is added or removed from the database the is incremented or decremented causing the hard-coded value to be changed every time. Is there a fix for this? I want to compare the value in my database to the value on the server and this is the only way I know to do it.

entities with parents id in the URL

Hello,

I have API URL like /accounts/:account/applications/:application/tasks/:task/attempts and don't see how to handle this kind of URL with ng-admin.

Any idea?

thanx

Add source map

Please add source map on the demo site to ease the learning process as people going around the site.

open

how to open this template in my localhost in xampp

install on new Ubuntu instance

I'm trying to get this installed on a new Ubuntu instance, but I'm not getting any response from http://localhost:8080. Here are the commands I am running on a new Ubuntu instance. Am I missing a step?

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install npm
npm install bower -g
sudo apt-get install git
git clone https://github.com/marmelab/ng-admin-demo.git
cd ng-admin-demo
make install
make data
make run

Here's the final output of the last command.
ubuntu@ip-172-31-24-238:~/ng-admin-demo$ make run


  • open http://localhost:8080/webpack-dev-server/ *
    70% 1/1 build moduleshttp://localhost:8080/
    webpack result is served from /build
    content is served from /home/ubuntu/ng-admin-demo
    Hash: 575f260f93ebaaa25fd3
    Version: webpack 1.12.14
    Time: 3974ms
    Asset Size Chunks Chunk Names
    main.js 2.32 MB 0 [emitted] main
    main.css 1.55 MB 0 [emitted] main
    chunk {0} main.js, main.css (main) 838 kB [rendered]
    [0] multi main 64 bytes {0} [built]
    1-dev-server/client?http://localhost:8080 2.67 kB {0} [built]
    2//node-libs-browser//url/url.js 22.3 kB {0} [built]
    3//node-libs-browser//url//punycode/punycode.js 14.6 kB {0} [built]
    4/buildin/module.js 251 bytes {0} [built]
    5/
    /node-libs-browser//url//querystring/index.js 127 bytes {0} [built]
    6//node-libs-browser//url//querystring/decode.js 2.4 kB {0} [built]
    7/
    /node-libs-browser//url//querystring/encode.js 2.09 kB {0} [built]
    8-dev-server//sockjs-client/lib/entry.js 244 bytes {0} [built]
    9-dev-server/
    /sockjs-client/lib/transport-list.js 613 bytes {0} [built]
    10-dev-server//sockjs-client/lib/transport/websocket.js 2.68 kB {0} [built]
    11/
    /node-libs-browser//process/browser.js 2.06 kB {0} [built]
    12-dev-server/
    /sockjs-client/lib/utils/event.js 2 kB {0} [built]
    13-dev-server//sockjs-client/lib/utils/random.js 746 bytes {0} [built]
    14-dev-server/
    /sockjs-client/lib/utils/browser-crypto.js 438 bytes {0} [built]
    15-dev-server//sockjs-client/lib/utils/url.js 975 bytes {0} [built]
    16-dev-server/
    /sockjs-client//url-parse/index.js 6.55 kB {0} [built]
    17-dev-server/
    /sockjs-client//url-parse//requires-port/index.js 753 bytes {0} [built]
    18-dev-server//sockjs-client//url-parse/lolcation.js 1.4 kB {0} [built]
    19-dev-server//sockjs-client//url-parse//querystringify/index.js 1.3 kB {0} [built]
    20-dev-server/
    /sockjs-client//debug/browser.js 3.76 kB {0} [built]
    21-dev-server/
    /sockjs-client//debug/debug.js 4.1 kB {0} [built]
    22-dev-server/
    /sockjs-client//debug//ms/index.js 2.33 kB {0} [built]
    23-dev-server//sockjs-client//inherits/inherits_browser.js 672 bytes {0} [built]
    24-dev-server//sockjs-client/lib/event/emitter.js 1.11 kB {0} [built]
    25-dev-server/
    /sockjs-client/lib/event/eventtarget.js 1.75 kB {0} [built]
    26-dev-server//sockjs-client/lib/transport/browser/websocket.js 58 bytes {0} [built]
    27-dev-server/
    /sockjs-client/lib/transport/xhr-streaming.js 1.25 kB {0} [built]
    28-dev-server//sockjs-client/lib/transport/lib/ajax-based.js 1.31 kB {0} [built]
    29-dev-server/
    /sockjs-client/lib/transport/lib/sender-receiver.js 1.15 kB {0} [built]
    30-dev-server//sockjs-client/lib/transport/lib/buffered-sender.js 2.3 kB {0} [built]
    31-dev-server/
    /sockjs-client/lib/transport/lib/polling.js 1.32 kB {0} [built]
    32-dev-server//sockjs-client/lib/transport/receiver/xhr.js 1.58 kB {0} [built]
    33-dev-server/
    /sockjs-client/lib/transport/sender/xhr-cors.js 343 bytes {0} [built]
    34-dev-server//sockjs-client/lib/transport/browser/abstract-xhr.js 4.67 kB {0} [built]
    35-dev-server/
    /sockjs-client/lib/transport/sender/xhr-local.js 352 bytes {0} [built]
    36-dev-server//sockjs-client/lib/utils/browser.js 560 bytes {0} [built]
    37-dev-server/
    /sockjs-client/lib/transport/xdr-streaming.js 984 bytes {0} [built]
    38-dev-server//sockjs-client/lib/transport/sender/xdr.js 2.42 kB {0} [built]
    39-dev-server/
    /sockjs-client/lib/transport/eventsource.js 766 bytes {0} [built]
    40-dev-server//sockjs-client/lib/transport/receiver/eventsource.js 1.58 kB {0} [built]
    41-dev-server/
    /sockjs-client/lib/transport/browser/eventsource.js 37 bytes {0} [built]
    42-dev-server//sockjs-client/lib/transport/lib/iframe-wrap.js 981 bytes {0} [built]
    43-dev-server/
    /sockjs-client/lib/transport/iframe.js 3.8 kB {0} [built]
    44-dev-server//sockjs-client//json3/lib/json3.js 43.3 kB {0} [built]
    45/buildin/amd-options.js 43 bytes {0} [built]
    46-dev-server//sockjs-client/lib/version.js 25 bytes {0} [built]
    47-dev-server/
    /sockjs-client/lib/utils/iframe.js 4.95 kB {0} [built]
    48-dev-server//sockjs-client/lib/utils/object.js 532 bytes {0} [built]
    49-dev-server/
    /sockjs-client/lib/transport/htmlfile.js 710 bytes {0} [built]
    50-dev-server//sockjs-client/lib/transport/receiver/htmlfile.js 2.17 kB {0} [built]
    51-dev-server/
    /sockjs-client/lib/transport/xhr-polling.js 894 bytes {0} [built]
    52-dev-server//sockjs-client/lib/transport/xdr-polling.js 712 bytes {0} [built]
    53-dev-server/
    /sockjs-client/lib/transport/jsonp-polling.js 1.02 kB {0} [built]
    54-dev-server//sockjs-client/lib/transport/receiver/jsonp.js 5.49 kB {0} [built]
    55-dev-server/
    /sockjs-client/lib/transport/sender/jsonp.js 2.46 kB {0} [built]
    56-dev-server//sockjs-client/lib/main.js 11.9 kB {0} [built]
    57-dev-server/
    /sockjs-client/lib/shims.js 18.2 kB {0} [built]
    58-dev-server//sockjs-client/lib/utils/escape.js 2.31 kB {0} [built]
    59-dev-server/
    /sockjs-client/lib/utils/transport.js 1.35 kB {0} [built]
    60-dev-server//sockjs-client/lib/utils/log.js 386 bytes {0} [built]
    61-dev-server/
    /sockjs-client/lib/event/event.js 485 bytes {0} [built]
    62-dev-server//sockjs-client/lib/location.js 177 bytes {0} [built]
    63-dev-server/
    /sockjs-client/lib/event/close.js 295 bytes {0} [built]
    64-dev-server//sockjs-client/lib/event/trans-message.js 292 bytes {0} [built]
    65-dev-server/
    /sockjs-client/lib/info-receiver.js 2.22 kB {0} [built]
    66-dev-server//sockjs-client/lib/transport/sender/xhr-fake.js 456 bytes {0} [built]
    67-dev-server/
    /sockjs-client/lib/info-iframe.js 1.52 kB {0} [built]
    68-dev-server//sockjs-client/lib/info-iframe-receiver.js 791 bytes {0} [built]
    69-dev-server/
    /sockjs-client/lib/info-ajax.js 1.03 kB {0} [built]
    70-dev-server//sockjs-client/lib/iframe-bootstrap.js 2.9 kB {0} [built]
    71-dev-server/
    /sockjs-client/lib/facade.js 723 bytes {0} [built]
    72-dev-server//strip-ansi/index.js 161 bytes {0} [built]
    73-dev-server/
    /strip-ansi//ansi-regex/index.js 135 bytes {0} [built]
    74/hot/dev-server.js 1.85 kB {0} [built]
    75/hot/log-apply-result.js 813 bytes {0} [built]
    [76] ./js/main.js 2.46 kB {0} [built]
    [77] ./js/api.js 642 bytes {0} [built]
    [78] ./
    /fakerest/dist/FakeRest.min.js 25.5 kB {0} [built]
    [79] .//sinon/lib/sinon/util/fake_server.js 7.8 kB {0} [built]
    [80] ./
    /sinon/lib/sinon/util/core.js 12.7 kB {0} [built]
    [81] .//sinon/lib/sinon/util/fake_xdomain_request.js 7.07 kB {0} [built]
    [82] ./
    /sinon/lib/sinon/extend.js 2.83 kB {0} [built]
    [83] .//sinon/lib/sinon/util/event.js 3.25 kB {0} [built]
    [84] ./
    /sinon/lib/sinon/log_error.js 1.36 kB {0} [built]
    [85] .//sinon/lib/sinon/util/fake_xml_http_request.js 21.4 kB {0} [built]
    [86] ./
    /sinon/lib/sinon/format.js 1.89 kB {0} [built]
    [87] .//sinon//util/util.js 15.6 kB {0} [optional] [built]
    [88] .//sinon//util/support/isBufferBrowser.js 203 bytes {0} [built]
    [89] .//sinon//util//inherits/inherits_browser.js 672 bytes {0} [built]
    [90] ./
    /sinon//formatio/lib/formatio.js 6.74 kB {0} [optional] [built]
    [91] ./
    /sinon//samsam/lib/samsam.js 12.9 kB {0} [built]
    [92] ./js/api_flavor.js 1.86 kB {0} [built]
    [93] ./js/types/AmountField.js 3.12 kB {0} [built]
    [94] ./
    /admin-config/lib/Field/NumberField.js 3.44 kB {0} [built]
    [95] .//admin-config/lib/Field/Field.js 8.26 kB {0} [built]
    [96] ./
    /admin-config/lib/Utils/stringUtils.js 632 bytes {0} [built]
    [97] ./js/types/AmountFieldView.js 900 bytes {0} [built]
    [98] ./js/reviews/approveReview.js 1.77 kB {0} [built]
    [99] ./js/reviews/batchApprove.js 2.13 kB {0} [built]
    [100] ./js/reviews/starRating.js 585 bytes {0} [built]
    [101] ./js/commands/basket.js 3.69 kB {0} [built]
    [102] ./js/dashboard/dashboardSummary.js 2.29 kB {0} [built]
    [103] .//moment/moment.js 122 kB {0} [built]
    [104] ./
    /moment/locale ^./.*$ 2.33 kB {0} [optional] [built]
    [105] .//moment/locale/af.js 2.62 kB {0} [optional] [built]
    [106] ./
    /moment/locale/ar.js 4.56 kB {0} [optional] [built]
    [107] .//moment/locale/ar-ma.js 2.08 kB {0} [optional] [built]
    [108] ./
    /moment/locale/ar-sa.js 3.12 kB {0} [optional] [built]
    [109] .//moment/locale/ar-tn.js 1.94 kB {0} [optional] [built]
    [110] ./
    /moment/locale/az.js 3.31 kB {0} [optional] [built]
    [111] .//moment/locale/be.js 4.86 kB {0} [optional] [built]
    [112] ./
    /moment/locale/bg.js 3.1 kB {0} [optional] [built]
    [113] .//moment/locale/bn.js 3.62 kB {0} [optional] [built]
    [114] ./
    /moment/locale/bo.js 3.87 kB {0} [optional] [built]
    [115] .//moment/locale/br.js 3.41 kB {0} [optional] [built]
    [116] ./
    /moment/locale/bs.js 4.63 kB {0} [optional] [built]
    [117] .//moment/locale/ca.js 2.9 kB {0} [optional] [built]
    [118] ./
    /moment/locale/cs.js 6.4 kB {0} [optional] [built]
    [119] .//moment/locale/cv.js 2.33 kB {0} [optional] [built]
    [120] ./
    /moment/locale/cy.js 2.88 kB {0} [optional] [built]
    [121] .//moment/locale/da.js 2.07 kB {0} [optional] [built]
    [122] ./
    /moment/locale/de.js 2.88 kB {0} [optional] [built]
    [123] .//moment/locale/de-at.js 2.96 kB {0} [optional] [built]
    [124] ./
    /moment/locale/dv.js 2.69 kB {0} [optional] [built]
    [125] .//moment/locale/el.js 3.73 kB {0} [optional] [built]
    [126] ./
    /moment/locale/en-au.js 2.32 kB {0} [optional] [built]
    [127] .//moment/locale/en-ca.js 2.2 kB {0} [optional] [built]
    [128] ./
    /moment/locale/en-gb.js 2.38 kB {0} [optional] [built]
    [129] .//moment/locale/en-ie.js 2.37 kB {0} [optional] [built]
    [130] ./
    /moment/locale/en-nz.js 2.32 kB {0} [optional] [built]
    [131] .//moment/locale/eo.js 2.67 kB {0} [optional] [built]
    [132] ./
    /moment/locale/es.js 2.9 kB {0} [optional] [built]
    [133] .//moment/locale/et.js 3.14 kB {0} [optional] [built]
    [134] ./
    /moment/locale/eu.js 2.33 kB {0} [optional] [built]
    [135] .//moment/locale/fa.js 3.23 kB {0} [optional] [built]
    [136] ./
    /moment/locale/fi.js 3.86 kB {0} [optional] [built]
    [137] .//moment/locale/fo.js 2.1 kB {0} [optional] [built]
    [138] ./
    /moment/locale/fr.js 2.17 kB {0} [optional] [built]
    [139] .//moment/locale/fr-ca.js 2.02 kB {0} [optional] [built]
    [140] ./
    /moment/locale/fr-ch.js 2.19 kB {0} [optional] [built]
    [141] .//moment/locale/fy.js 2.58 kB {0} [optional] [built]
    [142] ./
    /moment/locale/gd.js 2.63 kB {0} [optional] [built]
    [143] .//moment/locale/gl.js 2.71 kB {0} [optional] [built]
    [144] ./
    /moment/locale/he.js 3.41 kB {0} [optional] [built]
    [145] .//moment/locale/hi.js 3.85 kB {0} [optional] [built]
    [146] ./
    /moment/locale/hr.js 4.77 kB {0} [optional] [built]
    [147] .//moment/locale/hu.js 4 kB {0} [optional] [built]
    [148] ./
    /moment/locale/hy-am.js 3.22 kB {0} [optional] [built]
    [149] .//moment/locale/id.js 2.94 kB {0} [optional] [built]
    [150] ./
    /moment/locale/is.js 4.43 kB {0} [optional] [built]
    [151] .//moment/locale/it.js 2.46 kB {0} [optional] [built]
    [152] ./
    /moment/locale/ja.js 2.21 kB {0} [optional] [built]
    [153] .//moment/locale/jv.js 2.94 kB {0} [optional] [built]
    [154] ./
    /moment/locale/ka.js 3.15 kB {0} [optional] [built]
    [155] .//moment/locale/kk.js 2.68 kB {0} [optional] [built]
    [156] ./
    /moment/locale/km.js 2.02 kB {0} [optional] [built]
    [157] .//moment/locale/ko.js 1.99 kB {0} [optional] [built]
    [158] ./
    /moment/locale/lb.js 4.85 kB {0} [optional] [built]
    [159] .//moment/locale/lo.js 2.29 kB {0} [optional] [built]
    [160] ./
    /moment/locale/lt.js 4.33 kB {0} [optional] [built]
    [161] .//moment/locale/lv.js 3.86 kB {0} [optional] [built]
    [162] ./
    /moment/locale/me.js 4.11 kB {0} [optional] [built]
    [163] .//moment/locale/mk.js 3.11 kB {0} [optional] [built]
    [164] ./
    /moment/locale/ml.js 2.78 kB {0} [optional] [built]
    [165] .//moment/locale/mr.js 5.36 kB {0} [optional] [built]
    [166] ./
    /moment/locale/ms.js 2.85 kB {0} [optional] [built]
    [167] .//moment/locale/ms-my.js 2.86 kB {0} [optional] [built]
    [168] ./
    /moment/locale/my.js 2.73 kB {0} [optional] [built]
    [169] .//moment/locale/nb.js 2.17 kB {0} [optional] [built]
    [170] ./
    /moment/locale/ne.js 3.74 kB {0} [optional] [built]
    [171] .//moment/locale/nl.js 2.57 kB {0} [optional] [built]
    [172] ./
    /moment/locale/nn.js 2.09 kB {0} [optional] [built]
    [173] .//moment/locale/pa-in.js 4.01 kB {0} [optional] [built]
    [174] ./
    /moment/locale/pl.js 3.94 kB {0} [optional] [built]
    [175] .//moment/locale/pt.js 2.31 kB {0} [optional] [built]
    [176] ./
    /moment/locale/pt-br.js 2.2 kB {0} [optional] [built]
    [177] .//moment/locale/ro.js 2.58 kB {0} [optional] [built]
    [178] ./
    /moment/locale/ru.js 6.12 kB {0} [optional] [built]
    [179] .//moment/locale/se.js 2.23 kB {0} [optional] [built]
    [180] ./
    /moment/locale/si.js 2.39 kB {0} [optional] [built]
    [181] .//moment/locale/sk.js 5.49 kB {0} [optional] [built]
    [182] ./
    /moment/locale/sl.js 6.09 kB {0} [optional] [built]
    [183] .//moment/locale/sq.js 2.41 kB {0} [optional] [built]
    [184] ./
    /moment/locale/sr.js 4.09 kB {0} [optional] [built]
    [185] .//moment/locale/sr-cyrl.js 4.11 kB {0} [optional] [built]
    [186] ./
    /moment/locale/sv.js 2.3 kB {0} [optional] [built]
    [187] .//moment/locale/sw.js 2.05 kB {0} [optional] [built]
    [188] ./
    /moment/locale/ta.js 4.21 kB {0} [optional] [built]
    [189] .//moment/locale/te.js 3.06 kB {0} [optional] [built]
    [190] ./
    /moment/locale/th.js 2.33 kB {0} [optional] [built]
    [191] .//moment/locale/tl-ph.js 2.14 kB {0} [optional] [built]
    [192] ./
    /moment/locale/tlh.js 4.06 kB {0} [optional] [built]
    [193] .//moment/locale/tr.js 2.9 kB {0} [optional] [built]
    [194] ./
    /moment/locale/tzl.js 3.59 kB {0} [optional] [built]
    [195] .//moment/locale/tzm.js 2.06 kB {0} [optional] [built]
    [196] ./
    /moment/locale/tzm-latn.js 2.11 kB {0} [optional] [built]
    [197] .//moment/locale/uk.js 5.4 kB {0} [optional] [built]
    [198] ./
    /moment/locale/uz.js 2.03 kB {0} [optional] [built]
    [199] .//moment/locale/vi.js 2.64 kB {0} [optional] [built]
    [200] ./
    /moment/locale/zh-cn.js 4.36 kB {0} [optional] [built]
    [201] .//moment/locale/zh-tw.js 3.12 kB {0} [optional] [built]
    [202] ./js/dashboard/dashboardSummary.html 4.28 kB {0} [built]
    [203] ./js/products/zoomInModal.js 1.55 kB {0} [built]
    [204] ./js/segments/segmentsState.js 800 bytes {0} [built]
    [205] ./js/segments/segmentsTemplate.html 1.03 kB {0} [built]
    [206] ./js/segments/segments.js 348 bytes {0} [built]
    [207] ./js/customers/config.js 5.49 kB {0} [built]
    [208] ./js/categories/config.js 874 bytes {0} [built]
    [209] ./js/products/config.js 4.04 kB {0} [built]
    [210] ./js/products/productsEditionTemplate.html 8.71 kB {0} [built]
    [211] ./js/reviews/config.js 4.1 kB {0} [built]
    [212] ./js/commands/config.js 2.7 kB {0} [built]
    [213] ./js/settings/config.js 482 bytes {0} [built]
    [214] ./js/dashboard/config.js 3.63 kB {0} [built]
    [215] ./js/header.html 1.07 kB {0} [built]
    [216] ./js/menu.js 2.37 kB {0} [built]
    [217] ./css/main.scss 41 bytes {0} [built]
    Child extract-text-webpack-plugin:
    chunk {0} extract-text-webpack-plugin-output-filename 1.56 MB [rendered]
    [0] ./
    /css-loader!.//sass-loader!./css/main.scss 670 bytes {0} [built]
    [1] ./
    /css-loader/lib/css-base.js 1.51 kB {0} [built]
    [2] .//css-loader!.//ng-admin/build/ng-admin.min.css 1.56 MB {0} [built]
    webpack: bundle is now VALID.

Couldnt compile demo with sinon

I am very new to all this webpack stuff. I've downloaded the code and it works fine on my server. I then try to recompile main.js with webpack and stuck on the following warnings.

WARNING in .//sinon/lib/sinon/util/fake_server.js
Critical dependencies:
243:25-32 require function is used in a way in which dependencies cannot be statically extracted
@ ./
/sinon/lib/sinon/util/fake_server.js 243:25-32

WARNING in .//sinon/lib/sinon/util/core.js
Critical dependencies:
392:25-32 require function is used in a way in which dependencies cannot be statically extracted
@ ./
/sinon/lib/sinon/util/core.js 392:25-32

WARNING in .//sinon/lib/sinon/util/fake_server_with_clock.js
Critical dependencies:
97:25-32 require function is used in a way in which dependencies cannot be statically extracted
@ ./
/sinon/lib/sinon/util/fake_server_with_clock.js 97:25-32

WARNING in .//sinon/lib/sinon/util/fake_timers.js
Critical dependencies:
69:25-32 require function is used in a way in which dependencies cannot be statically extracted
@ ./
/sinon/lib/sinon/util/fake_timers.js 69:25-32

WARNING in .//sinon/lib/sinon/util/fake_xml_http_request.js
Critical dependencies:
706:25-32 require function is used in a way in which dependencies cannot be statically extracted
@ ./
/sinon/lib/sinon/util/fake_xml_http_request.js 706:25-32

WARNING in .//sinon/lib/sinon/util/fake_xdomain_request.js
Critical dependencies:
235:25-32 require function is used in a way in which dependencies cannot be statically extracted
@ ./
/sinon/lib/sinon/util/fake_xdomain_request.js 235:25-32

WARNING in .//sinon/lib/sinon/util/event.js
Critical dependencies:
107:25-32 require function is used in a way in which dependencies cannot be statically extracted
@ ./
/sinon/lib/sinon/util/event.js 107:25-32
Child extract-text-webpack-plugin:
+ 3 hidden modules

And if I run the admin module I get following error in console

Uncaught TypeError: Cannot read property 'call' of undefined
webpack_require @ main.js:20
loadDependencies @ main.js:384
(anonymous function) @ main.js:393
(anonymous function) @ main.js:399
(anonymous function) @ main.js:401
webpack_require @ main.js:20
(anonymous function) @ main.js:125
webpack_require @ main.js:20
(anonymous function) @ main.js:58
webpack_require @ main.js:20
(anonymous function) @ main.js:47
webpack_require @ main.js:20
(anonymous function) @ main.js:40
(anonymous function) @ main.js:43
angular.js:68
Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:nomod] Module 'myApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

I have following modules install through npm
admin-config
babel
babel-core
babel-loader
babel-preset-es2015
css-loader
extract-text-webpack-plugin
fakerest
html-loader
moment
ng-admin
node-sass
sass-loader
sinon
webpack

I am using latest gitbash to run the webpack command. And here is my webpack.config.js file. Since it didnt work with babel I had to us presets Es2015, somebody suggested that and it hide many errors :)

var ExtractTextPlugin = require('extract-text-webpack-plugin');

module.exports = {
entry: ["./js/main.js", "./css/main.scss"],
output: {
path: __dirname + "/build",
filename: "main.js",
publicPath: "/build"
},
module: {
loaders: [
{ test: /.css$/, loader: "style!css" },
{ test: /.jsx?$/, exclude: /(node_modules|bower_components)/, loader: 'babel', query: {
presets: ['es2015']
} },
{ test: /node_modules[\/]admin-config[\/].*.jsx?$/, loader: 'babel', query: {
presets: ['es2015']
} },
{ test: /.html$/, loader: 'html' },
{ test: /.css$/, loader: ExtractTextPlugin.extract('css') },
{ test: /.scss$/, loader: ExtractTextPlugin.extract('css!sass') }
]
},cache:false,
plugins: [
new ExtractTextPlugin('[name].css', {
allChunks: true
})
]
};

Please ask for more info if required. I didnt edit any files except the webpack.config.js

Thanks for your hard work, I appreciate that. Keep it up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.