12 |
13 | {% for (var chunk in o.htmlWebpackPlugin.assets) { %}
14 |
15 | {% } %}
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/test/test.module.coffee:
--------------------------------------------------------------------------------
1 | require 'angular'
2 | require '../dist/angular-memory-stats'
3 |
4 | module.exports = module = angular.module 'test', [
5 | 'angular-memory-stats'
6 | ]
7 | module.config (angularMemoryStatsProvider) ->
8 | angularMemoryStatsProvider.enable true
9 | angularMemoryStatsProvider.setCorner('bottomRight') # topLeft, topRight, bottomLeft, bottomRight
10 | angularMemoryStatsProvider.setCss
11 | right: '50px'
12 |
13 | module.run ($log) ->
14 | $log.info 'test running'
15 |
--------------------------------------------------------------------------------
/webpack.config.build.js:
--------------------------------------------------------------------------------
1 | var path = require('path'),
2 | webpack = require("webpack"),
3 | libPath = path.join(__dirname, 'lib'),
4 | distPath = path.join(__dirname, 'dist'),
5 | ngAnnotatePlugin = require('ng-annotate-webpack-plugin');
6 |
7 | module.exports = {
8 | entry: path.join(libPath, 'angular-memory-stats.coffee'),
9 | output: {
10 | path: distPath
11 | },
12 | module: {
13 | loaders: [{
14 | test: /\.coffee$/,
15 | loader: "coffee"
16 | }]
17 | },
18 | plugins: [
19 | new ngAnnotatePlugin({
20 | add: true
21 | }),
22 | new webpack.optimize.DedupePlugin()
23 | ]
24 | };
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path'),
2 | testPath = path.join(__dirname, 'test'),
3 | wwwPath = path.join(__dirname, 'www'),
4 | HtmlWebpackPlugin = require('html-webpack-plugin'),
5 | ngAnnotatePlugin = require('ng-annotate-webpack-plugin');
6 |
7 | module.exports = {
8 | entry: path.join(testPath, 'test.module.coffee'),
9 | output: {
10 | path: wwwPath,
11 | filename: 'test.js'
12 | },
13 | module: {
14 | loaders: [{
15 | test: /[\/]angular\.js$/,
16 | loader: 'expose?angular!exports?window.angular'
17 | }, {
18 | test: /\.coffee$/,
19 | loader: "coffee"
20 | }]
21 | },
22 | resolve: {
23 | extensions: ['', '.js', '.json', '.scss', '.coffee', '.html']
24 | },
25 | plugins: [new HtmlWebpackPlugin({
26 | filename: 'index.html',
27 | title: 'wp-api-angularjs',
28 | template: path.join(testPath, 'index.html')
29 | }),
30 | new ngAnnotatePlugin({
31 | add: true
32 | })
33 | ]
34 | };
--------------------------------------------------------------------------------