diff --git a/.bowerrc b/.bowerrc
deleted file mode 100644
index 37d514db3..000000000
--- a/.bowerrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "directory": "examples/bower_components"
-}
\ No newline at end of file
diff --git a/.npmignore b/.npmignore
new file mode 100644
index 000000000..03344ec7e
--- /dev/null
+++ b/.npmignore
@@ -0,0 +1,54 @@
+.github
+.travis.yml
+CLA.md
+CONTRIBUTING.md
+
+# ignore dist except the build
+dist/
+dist/**/*.*
+!dist/jsonforms.js
+
+###########################################
+# Copied from .gitgnore
+###########################################
+
+temp/
+coverage/
+reports/
+
+# npm
+node_modules/
+
+# all js files in components
+src/components/**/*.js
+
+# all js files in tests except the configs
+tests/**/*.js
+/typings/browser.d.ts
+/typings/main.d.ts
+/typings/main
+/typings/browser
+!tests/e2e-tests/protractor.conf.js
+!karma.conf.js
+
+# typescript mappings
+**/*.map
+
+# typescript cache files
+.tscache/
+
+# logs
+*.log
+
+# examples
+examples/bower_components/
+examples/css/jsonforms.css
+examples/js/jsonforms.js
+examples/js/jsonforms.min.js
+examples/fonts
+
+# webstorm
+.idea
+
+# mac users
+.DS_Store
\ No newline at end of file
diff --git a/Gruntfile.js b/Gruntfile.js
deleted file mode 100644
index 39b527ee9..000000000
--- a/Gruntfile.js
+++ /dev/null
@@ -1,433 +0,0 @@
-module.exports = function(grunt) {
-
- // Project configuration.
- grunt.initConfig({
- pkg: grunt.file.readJSON('package.json'),
-
- // Config for Concat Task
- concat: {
- options: {
- // Remove all existing banners
- stripBanners: true,
-
- // Replace all 'use strict' statements in the code with a single one at the top
- process: function(src, filepath) {
- return '// Source: ' + filepath + '\n' +
- src.replace(/(^|\n)[ \t]*('use strict'|"use strict");?\s*/g, '$1');
- },
-
- // Add new banner on top of generated file
- banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
- '<%= grunt.template.today("yyyy-mm-dd") %> Copyright (c) EclipseSource Muenchen GmbH and others. */ \n' +
- "'use strict';\n"
- },
- services: {
- src: ['components/services/**/*.js', '!components/services/**/*.spec.js'],
- filter: 'isFile',
- dest: 'temp/services.js'
- },
- jsonforms_module: {
- src: ['components/**/jsonforms-*.js', '!components/**/*.spec.js'],
- filter: 'isFile',
- dest: 'temp/jsonforms-module.js'
- },
- dist: {
- // Concat all files from components directory and include the embedded templates
- src: ['temp/services.js', 'temp/jsonforms-module.js', 'temp/**/*.js'],
- filter: 'isFile',
- dest: 'dist/js/<%= pkg.name %>.js'
- }
- },
-
- ts: {
- dist: {
- src: ['components/**/*.ts', '!components/**/*.spec.ts', 'typings/**/*.ts'],
- dest: '',
- reference: 'components/references.ts',
- options: {
- target: 'es5',
- module: 'commonjs',
- sourceMap: true,
- declaration: false
- }
- },
- test: {
- src: ['tests/**/*.ts', 'components/references.ts', 'components/**/*.spec.ts'],
- dest: '',
- reference: 'tests/references.ts',
- options: {
- target: 'es5',
- module: 'commonjs',
- sourceMap: true,
- declaration: false
- }
- }
- },
-
- 'angular-builder': {
- options: {
- mainModule: 'jsonforms',
- externalModules: ['ui.bootstrap', 'ui.validate', 'ui.grid', 'ui.grid.edit', 'ui.grid.pagination', 'ui.grid.autoResize']
- },
- examples: {
- src: 'components/**/*.js',
- dest: 'temp/jsonforms.js'
- }
- },
-
- //Config for embedding templates in angular module
- ngtemplates: {
- dist: {
- src: 'components/**/*.html',
- dest: 'temp/templates.js',
- options: {
- htmlmin: { collapseWhitespace: true, collapseBooleanAttributes: true },
- module: "jsonforms"
- }
- }
- },
-
- copy: {
- bootstrapfonts: {
- files: [
- // bootstrap fonts to dist
- {expand:true, cwd: 'node_modules/bootstrap/fonts', src: ['**'], dest: 'dist/fonts'}
- ]
- },
- examples: {
- files: [
- // dist to examples
- {expand:true, cwd: 'dist/', src: ['**'], dest: 'examples'}
- ]
- }
- },
-
- // Config for Uglify (= Minify) Task
- uglify: {
- options: {
- // Use default
-
- // Uncomment to ease debugging
- // mangle: false
- },
- dist: {
- src: 'dist/js/<%= pkg.name %>.js',
- dest: 'dist/js/<%= pkg.name %>.min.js'
- }
- },
-
- // Config for Jshint Task
- jshint: {
- beforeconcat: ['components/**'],
- afterconcat: ['dist/js/<%= pkg.name %>.js'],
- options: { jshintrc: '.jshintrc' }
- },
-
- less: {
- bootstrap: {
- options: {
- modifyVars: {
- "grid-columns": 100
- }
- },
- files: {
- 'temp/bootstrap100col.css': 'node_modules/bootstrap/less/bootstrap.less'
- }
- },
- jsonforms: {
- options: {
- paths: ['temp']
- },
- files: {
- 'dist/css/jsonforms.css': ['css/wrapper.css', 'components/**/*.css']
- }
- }
- },
-
- // Config for Karma (Unit Test) Task
- karma: {
- unit: {
- configFile: 'karma.conf.js',
- singleRun: true
- }
- },
-
- // Config for Connect (Start Webserver) Task
- connect: {
- server: {
- options: {
- port: 8000,
- base: 'examples'
- }
- }
- },
-
- // Config for Protractor (e2e Test) Task
- protractor: {
- options: {
- configFile: 'tests/e2e-tests/protractor.conf.js'
- },
- run: {}
- },
-
- watch: {
- js: {
- files: 'components/**',
- tasks: ['concat:dist', 'uglify:dist']
- },
- css: {
- files: 'css/**',
- tasks: ['less:bootstrap', 'less:jsonforms']
- },
- templates: {
- files: 'templates/**',
- tasks: ['ngtemplates:dist', "concat:dist", 'uglify:dist']
- },
- examples: {
- files: ['dist/**'],
- tasks: ['copy:examples']
- }
- },
-
- clean: {
- dist: [
- 'dist/**',
- 'temp/**'
- ],
- examples: [
- 'examples/js/jsonforms*',
- 'examples/css/jsonforms*'
- ],
- dev: [
- 'components/references.ts',
- 'components/**/*.js',
- 'components/**/*.js.map',
- 'tests/references.ts',
- 'tests/**/*.js',
- '!**/*.conf.js',
- 'tests/**/*.js.map'
- ],
- downloads: [
- 'examples/bower_components',
- 'node_modules'
- ],
- coverage: [
- 'coverage'
- ],
- cache: [
- '.tscache'
- ],
- all: [
- 'dist',
- 'temp',
- 'examples/js/jsonforms*',
- 'examples/css/jsonforms*',
- 'components/references.ts',
- 'components/**/*.js',
- 'components/**/*.js.map',
- 'tests/references.ts',
- 'tests/**/*.js',
- '!**/*.conf.js',
- 'tests/**/*.js.map',
- 'examples/bower_components',
- 'node_modules',
- 'coverage',
- '.tscache'
- ]
- },
-
- remapIstanbul: {
- build: {
- src: 'coverage/coverage-final.json',
- options: {
- reports: {
- 'html': 'coverage/html-report',
- 'json': 'coverage/mapped-coverage-final.json',
- 'lcovonly': 'coverage/mapped-coverage.info'
- }
- }
- }
- },
-
- coveralls: {
- karma_tests: {
- src: 'coverage/mapped-coverage.info'
- }
- },
-
- bump: {
- options: {
- files: ['package.json', 'bower.json'],
- updateConfigs: ['pkg'],
- commit: true,
- commitMessage: 'Bump version to v%VERSION%',
- commitFiles: ['package.json', 'bower.json'],
- createTag: false,
- push: false,
- globalReplace: false,
- prereleaseName: false,
- metadata: '',
- regExp: false
- }
- },
-
- file_append: {
- bootstraplicense: {
- files: [
- {
- append:"\n############################################################################\n\nThis software includes a modified version of the Bootstrap framework\n(Copyright (c) 2011-2015 Twitter, Inc) within the dist/css/jsonforms.css file.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.",
- input: 'LICENSE',
- output: 'LICENSE'
- }
- ]
- }
- },
-
- gitcheckout: {
- deploy: {
- options: {
- branch: 'deploy-v<%= pkg.version %>',
- overwrite: true
- }
- }
- },
-
- gitadd: {
- deploy: {
- options: {
- force: true
- },
- files: {
- src: ['dist', 'dist/**/*', 'LICENSE', 'components/references.ts']
- }
- }
- },
-
- gitcommit: {
- deploy: {
- options: {
- message: "Release Version v<%= pkg.version %>"
- },
- files: {
- src: ['dist', 'dist/**/*', 'LICENSE', 'components/references.ts']
- }
- }
- },
-
- gittag: {
- deploy: {
- options: {
- tag: 'v<%= pkg.version %>',
- message: 'Release version v<%= pkg.version %>'
- }
- }
- },
-
- gitpush: {
- deploy: {
- options: {
- remote: 'upstream',
- tags: true
- }
- }
- }
- });
-
- // Load the plugin that provides the "concat" task.
- grunt.loadNpmTasks('grunt-contrib-concat');
-
- grunt.loadNpmTasks('grunt-contrib-copy');
-
- grunt.loadNpmTasks('grunt-contrib-jshint');
-
- grunt.loadNpmTasks('grunt-contrib-less');
-
- // clean
- grunt.loadNpmTasks('grunt-contrib-clean');
-
- // inline templates into jsonforms.js
- grunt.loadNpmTasks('grunt-angular-templates');
-
- // Load the plugin that provides the "uglify" task.
- grunt.loadNpmTasks('grunt-contrib-uglify');
-
- // Load the plugin that provides the "karma" task.
- grunt.loadNpmTasks('grunt-karma');
-
- // Load the plugin that provides the "connect" task.
- grunt.loadNpmTasks('grunt-contrib-connect');
-
- // Load the plugin that provides the "protractor" task.
- grunt.loadNpmTasks('grunt-protractor-runner');
-
- grunt.loadNpmTasks('grunt-contrib-watch');
-
- grunt.loadNpmTasks('grunt-angular-builder');
-
- grunt.loadNpmTasks('grunt-ts');
-
- grunt.loadNpmTasks('remap-istanbul');
-
- grunt.loadNpmTasks('grunt-coveralls');
-
- grunt.loadNpmTasks('grunt-git');
-
- grunt.loadNpmTasks('grunt-bump');
-
- grunt.loadNpmTasks('grunt-file-append');
-
- // Build distribution
- grunt.registerTask('dist', [
- 'clean:dist',
- 'less:bootstrap',
- 'less:jsonforms',
- 'copy:bootstrapfonts',
- 'ts:dist',
- 'ngtemplates:dist',
- 'angular-builder',
- 'concat:services',
- 'concat:jsonforms_module',
- 'concat:dist',
- 'uglify:dist'
- ]);
-
- // Build example applications
- grunt.registerTask('examples', [
- 'dist',
- 'copy:examples'
- ]);
-
- // Test unit and e2e tests
- grunt.registerTask('test', [
- 'clean:coverage',
- 'examples',
- 'ts:test',
- 'karma',
- 'connect',
- 'protractor',
- 'remapIstanbul'
- ]);
-
- // Hint task
- grunt.registerTask('hint', [
- 'jshint'
- ]);
-
- grunt.registerTask('deploy', [
- 'dist',
- 'bump-only:patch',
- 'bump-commit',
- 'file_append:bootstraplicense',
- 'gitcheckout:deploy',
- 'gitadd:deploy',
- 'gitcommit:deploy',
- 'gittag:deploy',
- 'gitpush:deploy'
- ]);
-
- // Build distribution as default
- grunt.registerTask('default', [
- 'dist'
- ]);
-
-};
diff --git a/examples/embed-index.html b/examples/embed-index.html
index 626a1b1d9..646bb954f 100644
--- a/examples/embed-index.html
+++ b/examples/embed-index.html
@@ -16,7 +16,7 @@
-
+
diff --git a/package.json b/package.json
index b1533cb15..35abc68d8 100644
--- a/package.json
+++ b/package.json
@@ -1,15 +1,22 @@
{
"name": "jsonforms",
- "version": "0.0.16",
+ "version": "0.0.18",
"description": "Generating forms for JSON schema",
"repository": "https://github.com/eclipsesource/jsonforms",
+ "bugs": "https://github.com/eclipsesource/jsonforms/issues",
+ "homepage": "http://github.eclipsesource.com/jsonforms/",
"license": "MIT",
"main": "/",
"scripts": {
"start": "webpack --config webpack/webpack.dev.js --watch --NODE_ENV=dev",
"test": "karma start --NODE_ENV=test",
"build": "webpack --config webpack/webpack.build.js --NODE_ENV=production --display-error-details",
- "postinstall": "typings install"
+ "postinstall": "typings install",
+ "publish-patch": "npm -no-git-tag-version version patch && npm run commit-local && npm run push-tag && npm publish",
+ "publish-minor": "npm -no-git-tag-version version minor && npm run commit-local && npm run push-tag && npm publish",
+ "publish-major": "npm -no-git-tag-version version major && npm run commit-local && npm run push-tag && npm publish",
+ "commit-local": "git add package.json && git commit -m \"Bump version number to $npm_package_version\"",
+ "push-tag": "git checkout -b auto-git-publish-$npm_package_version && git add -f dist/jsonforms.js && git commit -m \"Release $npm_package_version\" && git tag -a $npm_package_version -m \"Release $npm_package_version\" && git push upstream $npm_package_version"
},
"dependencies": {
"angular": "1.5.0",
diff --git a/webpack/webpack.build.js b/webpack/webpack.build.js
index b42ef893f..2975470a8 100644
--- a/webpack/webpack.build.js
+++ b/webpack/webpack.build.js
@@ -8,8 +8,8 @@ module.exports = {
'./src/index.ts'
],
output: {
- filename: 'build.js',
- path: 'dist/js'
+ filename: 'jsonforms.js',
+ path: 'dist'
},
plugins: [
new webpack.optimize.UglifyJsPlugin(