Skip to content

Commit

Permalink
Remove fixture and work directly with plone
Browse files Browse the repository at this point in the history
  • Loading branch information
rodfersou committed Feb 23, 2016
1 parent dea8e8d commit 14db656
Show file tree
Hide file tree
Showing 23 changed files with 51 additions and 276 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ Development

The buildout configuration already installs PhantomJS and makes it available by updating the `PATH` environment variable.

We use yeoman and grunt to build static files, to start grunt serve run:
We use yeoman and grunt to build static files, to start grunt watch run:

.. code-block:: console
buildout_dir$ ./bin/grunt_serve
buildout_dir$ ./bin/grunt_watch
Then open the browser at http://localhost:9000 and edit the files at directory yeoman/app to customize the static files.

Expand Down
16 changes: 3 additions & 13 deletions buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ parts +=
rebuild_bower
rebuild_npm
grunt_build
grunt_dev
grunt_serve
grunt_watch
grunt_jshint
grunt_test
run_rebuild_bower
Expand Down Expand Up @@ -102,26 +101,17 @@ input = inline:
output = ${buildout:bin-directory}/grunt_build
mode = 755

[grunt_dev]
[grunt_watch]
recipe = collective.recipe.template
input = inline:
#!/bin/sh
PATH=${buildout:bin-directory}:$PATH
cd yeoman
grunt dev
grunt watch
output = ${buildout:bin-directory}/grunt_dev
mode = 755

[grunt_serve]
recipe = collective.recipe.template
input = inline:
#!/bin/sh
PATH=${buildout:bin-directory}:$PATH
cd yeoman
grunt serve
output = ${buildout:bin-directory}/grunt_serve
mode = 755

[grunt_jshint]
recipe = collective.recipe.template
input = inline:
Expand Down
2 changes: 1 addition & 1 deletion src/collective/behavior/featuredimage/static/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/collective/behavior/featuredimage/static/main.js

Large diffs are not rendered by default.

36 changes: 2 additions & 34 deletions yeoman/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,6 @@ module.exports = function (grunt) {
grunt.file.write('.tmp/scripts/templates.js', 'this.JST = this.JST || {};');
});

grunt.registerTask('server', function (target) {
grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.');
grunt.task.run(['serve' + (target ? ':' + target : '')]);
});

grunt.registerTask('serve', function (target) {
if (target === 'test') {
return grunt.task.run([
'clean:server',
'babel',
'createDefaultTemplate',
'jst',
'postcss',
'connect:test',
'open:test',
'watch'
]);
}

grunt.task.run([
'clean:server',
'babel:dist',
'createDefaultTemplate',
'jst',
'postcss',
'connect:livereload',
'watch'
]);
});

grunt.registerTask('test', function (isConnected) {
isConnected = Boolean(isConnected);
var testTasks = [
Expand Down Expand Up @@ -105,18 +75,16 @@ module.exports = function (grunt) {

grunt.registerTask('dev', [
'clean:dist',
'babel',
'babel:dist',
'createDefaultTemplate',
'jst',
'postcss',
'useminPrepare',
'imagemin',
'htmlmin',
'concat',
'requirejs',
'copy:dev',
'clean:aftercopy',
'usemin'
'clean:aftercopy'
]);

grunt.registerTask('default', [
Expand Down
121 changes: 0 additions & 121 deletions yeoman/app/behaviorform.html

This file was deleted.

43 changes: 0 additions & 43 deletions yeoman/app/featuredimage.html

This file was deleted.

1 change: 0 additions & 1 deletion yeoman/app/fixture/authoring.css

This file was deleted.

Binary file removed yeoman/app/fixture/featuredimage-base-dark.png
Binary file not shown.
Binary file removed yeoman/app/fixture/featuredimage-base.png
Binary file not shown.
1 change: 0 additions & 1 deletion yeoman/app/fixture/forms.css

This file was deleted.

1 change: 0 additions & 1 deletion yeoman/app/fixture/public.css

This file was deleted.

1 change: 0 additions & 1 deletion yeoman/app/fixture/reset.css

This file was deleted.

25 changes: 0 additions & 25 deletions yeoman/app/index.html

This file was deleted.

File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion yeoman/app/styles/behaviorform.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
{
iframe
{
transform: scale(.5, .5) translate(-50%, -50%);
max-width: inherit;

transform: scale(.5, .5) translate(-50%, -50%);
}
}
1 change: 0 additions & 1 deletion yeoman/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "0.0.0",
"dependencies": {
"backbone": "~1.1.0",
"jquery": "~2.1.0",
"lodash": "~2.4.1",
"requirejs": "~2.1.10",
"requirejs-text": "~2.0.10"
Expand Down
4 changes: 2 additions & 2 deletions yeoman/grunt/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
files: [ {
expand: true,
cwd: '<%= yeoman.app %>/scripts',
src: '{,*/}*.es6',
src: '{,*/}*.js',
dest: '.tmp/scripts',
ext: '.js'
} ]
Expand All @@ -16,7 +16,7 @@ module.exports = {
files: [ {
expand: true,
cwd: 'test/spec',
src: '{,*/}*.es6',
src: '{,*/}*.js',
dest: '.tmp/spec',
ext: '.js'
} ]
Expand Down
17 changes: 3 additions & 14 deletions yeoman/grunt/connect.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
module.exports = function(grunt, options) {
return {
options: {
options: {
port: grunt.option('port') || grunt.SERVER_PORT,
// change this to '0.0.0.0' to access the server from outside
hostname: 'localhost'
},
livereload: {
options: {
middleware: function (connect) {
return [
grunt.lrSnippet,
grunt.mountFolder(connect, '.tmp'),
grunt.mountFolder(connect, grunt.yeomanConfig.app)
];
}
}
},
test: {
options: {
port: 9001,
middleware: function (connect) {
middleware: function(connect) {
return [
grunt.mountFolder(connect, 'test'),
grunt.lrSnippet,
Expand All @@ -31,7 +20,7 @@ module.exports = function(grunt, options) {
},
dist: {
options: {
middleware: function (connect) {
middleware: function(connect) {
return [
grunt.mountFolder(connect, grunt.yeomanConfig.dist)
];
Expand Down
Loading

0 comments on commit 14db656

Please sign in to comment.