Skip to content

Commit

Permalink
Merge 7e2fbb9 into c1de803
Browse files Browse the repository at this point in the history
  • Loading branch information
thet committed Oct 5, 2018
2 parents c1de803 + 7e2fbb9 commit 5412e47
Show file tree
Hide file tree
Showing 29 changed files with 7,043 additions and 8,322 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
44 changes: 43 additions & 1 deletion CHANGES.rst
@@ -1,7 +1,49 @@
Changelog
=========

2.7.6 (Unreleased)
3.0 (unreleased)
----------------

TODO:

- Refactor docs like in Patterns to get rid of react.
- since we removed marked and react, refactor docs like in Patterns.

- Refactor jquery.recurrenceinput.js dependencies


Breaking changes:

* Uses now ``yarn`` instead of ``bower``.
``bower.json`` is dropped, ``package.json`` is extended and all packages go into ``mockup/node_modules``.
Note: you have to use ``yarn`` for that to work, as with npm there is no way to customize the modules directory.
All references in LESS files to ``bowerPath`` are kept for a frictionless upgrade.
[thet]

* Remove obsolete dependencies:
- console-polyfill
- es5-shim
- selectivizr
- js-shortcuts
- marked
- react
- JSXTransformer
[thet]

* Remove support for IE < 9.
[thet]

New features:

* Add ``plone-patterns-toolbar`` pattern from CMFPlone.
[thet]

Bug fixes:

* add items here


2.6.3 (Unreleased)
------------------

Breaking changes:
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

0 comments on commit 5412e47

Please sign in to comment.