Skip to content

Commit

Permalink
Merge 20541d6 into d8b6d11
Browse files Browse the repository at this point in the history
  • Loading branch information
thet committed Feb 7, 2019
2 parents d8b6d11 + 20541d6 commit a06432a
Show file tree
Hide file tree
Showing 32 changed files with 7,030 additions and 8,327 deletions.
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -14,3 +14,4 @@ stamp-bower
stamp-npm
test-results.xml
.vscode
!.yarnrc
113 changes: 0 additions & 113 deletions .nix/bower.nix

This file was deleted.

4 changes: 2 additions & 2 deletions .nix/default.nix
Expand Up @@ -46,9 +46,9 @@ in rec {
requirejs
];
postInstall = ''
mkdir -p $out/bower_components
mkdir -p $out/node_modules
${pkgs.lib.concatStrings (map (p: ''
ln -s ${pkgs.fetchbower p.name p.version p.target p.outputHash}/packages/*/${p.version} $out/bower_components/${p.name}
ln -s ${pkgs.fetchbower p.name p.version p.target p.outputHash}/packages/*/${p.version} $out/node_modules/${p.name}
'') bowerPackages )}
'';

Expand Down
1 change: 1 addition & 0 deletions .yarnrc
@@ -0,0 +1 @@
--modules-folder mockup/node_modules
2 changes: 0 additions & 2 deletions CHANGES.rst
Expand Up @@ -8,7 +8,6 @@ Changelog
.. towncrier release notes start
2.7.7 (2018-12-10)
------------------

Expand All @@ -17,7 +16,6 @@ New features:
- pat-resourceregistry:
- Add input fiels for ``merge_with``, ``last_compilation``, ``jscompilation`` and ``csscompilation``.
- Add ``load_async`` and ``load_defer`` options.
[thet]

Bug fixes:

Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Expand Up @@ -13,7 +13,7 @@ recursive-include mockup/patterns *
recursive-include mockup/tests *
prune .nix
prune dist
prune mockup/bower_components
prune mockup/node_modules
prune mockup/build
prune mockup/coverage
prune mockup/docs
Expand Down
34 changes: 12 additions & 22 deletions Makefile
@@ -1,9 +1,7 @@
GIT = git
NPM = npm

GRUNT = ./node_modules/grunt-cli/bin/grunt
BOWER = ./node_modules/bower/bin/bower
NODE_PATH = ./node_modules
NODE_PATH = ./mockup/node_modules
GRUNT = $(NODE_PATH)/grunt-cli/bin/grunt
BUILD_DIR = ./mockup/build

DEBUG =
Expand All @@ -19,14 +17,10 @@ endif
all: test-once bundles docs

stamp-npm: package.json
npm install
yarn install
touch stamp-npm

stamp-bower: stamp-npm bower.json
$(BOWER) install
touch stamp-bower

bundles: stamp-bower bundle-widgets bundle-structure bundle-plone
bundles: stamp-npm bundle-widgets bundle-structure bundle-plone
# ----------------------------------------------------------------------- #
# For plone 5, build the bundles on the plone side, as described in:
# Products.CMFPlone/DEVELOPING_BUNDLES.rst
Expand Down Expand Up @@ -60,27 +54,26 @@ bootstrap-common:
mkdir -p $(BUILD_DIR)

bootstrap: bootstrap-common
$(NPM) link
NODE_PATH=$(NODE_PATH) $(BOWER) install --config.interactive=0
NODE_PATH=$(NODE_PATH) yarn install

bootstrap-nix: clean bootstrap-common
nix-build default.nix -A build -o nixenv
ln -s nixenv/lib/node_modules/mockup/node_modules
ln -s nixenv/bower_components
ln -s nixenv/node_modules

jshint:
NODE_PATH=$(NODE_PATH) $(GRUNT) jshint $(DEBUG) $(VERBOSE) --gruntfile=mockup/Gruntfile.js

watch:
NODE_PATH=$(NODE_PATH) $(GRUNT) watch $(DEBUG) $(VERBOSE) --gruntfile=mockup/Gruntfile.js

test: stamp-bower
test: stamp-npm
NODE_PATH=$(NODE_PATH) $(GRUNT) test $(DEBUG) $(VERBOSE) --gruntfile=mockup/Gruntfile.js --pattern=$(pattern)

test-once: stamp-bower
test-once: stamp-npm
NODE_PATH=$(NODE_PATH) $(GRUNT) test_once $(DEBUG) $(VERBOSE) --gruntfile=mockup/Gruntfile.js --pattern=$(pattern)

test-jenkins: stamp-bower
test-jenkins: stamp-npm
NODE_PATH=$(NODE_PATH) $(GRUNT) test_jenkins $(DEBUG) $(VERBOSE) --gruntfile=mockup/Gruntfile.js --pattern=$(pattern)

test-dev:
Expand All @@ -98,14 +91,11 @@ test-ci:
clean:
mkdir -p $(BUILD_DIR)
rm -rf $(BUILD_DIR)
rm -rf node_modules
rm -rf mockup/bower_components
rm -f stamp-npm stamp-bower
rm -rf node_modules src/bower_components
rm -rf mockup/node_modules
rm -f stamp-npm

clean-deep: clean
if test -f $(BOWER); then $(BOWER) cache clean; fi
if test -f $(NPM); then $(NPM) cache clean; fi
yarn cache clean

publish-docs:
echo -e "Publishing 'docs' bundle!\n"; cd mockup/docs; git add -fA .; git commit -m "Publishing docs"; git push -f git@github.com:plone/mockup.git gh-pages; cd ../..;
Expand Down
63 changes: 0 additions & 63 deletions bower.json

This file was deleted.

2 changes: 1 addition & 1 deletion mockup/GETTING_STARTED.md
Expand Up @@ -47,7 +47,7 @@ and then you open index.html with your browser!

* `less/` : Contains all the [Less](http://lesscss.org/) code for all the patterns and bundles

* `lib/` : Contains external libraries not necessarily found in the bower repositories
* `lib/` : Contains external libraries not necessarily found in ``mockup/node_modules``.

* `tests/` : Contains all tests for patterns and bundles, including general setup and configuration code

Expand Down
11 changes: 5 additions & 6 deletions mockup/Gruntfile.js
Expand Up @@ -27,7 +27,7 @@ module.exports = function(grunt) {
options: {
paths: ['../../../'],
modifyVars: {
bowerPath: '"bower_components/"',
bowerPath: '"node_modules/"',
mockupPath: '"patterns/"',
mockuplessPath: '"less/"'
}
Expand All @@ -37,7 +37,7 @@ module.exports = function(grunt) {
docs: {
files: [
{ expand: true, src: '*.md', dest: 'docs/dev/' },
{ expand: true, src: 'bower_components/**', dest: 'docs/dev/' },
{ expand: true, src: 'node_modules/**', dest: 'docs/dev/' },
{ expand: true, src: 'index.html', dest: 'docs/dev/' },
{ expand: true, src: 'js/**', dest: 'docs/dev/' },
{ expand: true, src: 'less/**', dest: 'docs/dev/' },
Expand Down Expand Up @@ -65,9 +65,8 @@ module.exports = function(grunt) {
//},
'docs-legacy-js': {
path: 'docs/dev/index.html',
pattern:
'<script src="bower_components/es5-shim/es5-shim.js"></script>\n <script src="bower_components/es5-shim/es5-sham.js"></script>\n <script src="bower_components/console-polyfill/index.js"></script>',
replacement: '<script src="docs-legacy.js"></script>'
pattern: '<script src="node_modules/requirejs/require.js"></script>',
replacement: '<script src="docs-legacy.js"></script>\n<script src="node_modules/requirejs/require.js"></script>'
},
'docs-catalogurl': {
path: 'docs/dev/index.html',
Expand Down Expand Up @@ -159,7 +158,7 @@ module.exports = function(grunt) {
console.log('read folder: ' + path);
var files = fs.readdirSync(path);
files.forEach(function(filename) {
if (filename === 'bower_components' || filename === 'node_modules') {
if (filename === 'node_modules' || filename === 'node_modules') {
return;
}
var stats = fs.statSync(path + filename);
Expand Down
4 changes: 2 additions & 2 deletions mockup/LEARN.md
Expand Up @@ -18,7 +18,6 @@ You might also want to review the *Mockup Project Structure* section of *Getting

<pre>
mockup/
bower.json
CHANGES.rst
CONTRIBUTING.rst
LICENSE.rst
Expand Down Expand Up @@ -47,6 +46,7 @@ mockup/
node_modules/
patterns/
tests/
package.json
&hellip;
</pre>

Expand Down Expand Up @@ -123,7 +123,7 @@ So, first open the file *js/config.js* and add the following line under the *pat
baseUrl: './',
paths: {
&hellip;
'underscore': 'bower_components/underscore/underscore',
'underscore': 'node_modules/underscore/underscore',
'mockup-patterns-helloworld': 'patterns/hello/pattern' // <- right here!
},
&hellip;
Expand Down

0 comments on commit a06432a

Please sign in to comment.