diff --git a/.gitignore b/.gitignore index c346b13..fbe05fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ bower_components/ -node_modules/ diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index a6bacc3..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = function(grunt) { - - grunt.initConfig({ - 'connect': { - demo: { - options: { - open: true, - keepalive: true - } - } - }, - 'gh-pages': { - options: { - clone: 'bower_components/my-repo' - }, - src: [ - 'bower_components/**/*', - '!bower_components/my-repo/**/*', - 'demo/*', 'src/*', 'index.html' - ] - } - }); - - grunt.loadNpmTasks('grunt-contrib-connect'); - grunt.loadNpmTasks('grunt-gh-pages'); - - grunt.registerTask('deploy', ['gh-pages']); - grunt.registerTask('server', ['connect']); - -}; diff --git a/README.md b/README.md index 6a8c3b2..07d7ecb 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ > A bare minimum custom element starter-kit using [VanillaJS](http://vanilla-js.com/). > +> Like [Yeoman](http://yeoman.io/)? Use the [generator-element](https://www.npmjs.org/package/generator-element) instead. +> > Looking for a working example? Check [hello-world-element](https://github.com/webcomponents/hello-world-element). ## Demo @@ -20,16 +22,16 @@ Or [download as ZIP](https://github.com/my-user/my-repo/archive/master.zip). ## Usage -1. Import Web Components' polyfill: +1. Import polyfill: ```html - + ``` -2. Import Custom Element: +2. Import custom element: ```html - + ``` 3. Start using it! @@ -60,38 +62,24 @@ Event | Description In order to run it locally you'll need to fetch some dependencies and a basic server setup. -* Install [Bower](http://bower.io/) & [Grunt](http://gruntjs.com/): +1. Install [bower](http://bower.io/) & [polyserve](https://npmjs.com/polyserve): ```sh - $ [sudo] npm install -g bower grunt-cli + $ npm install -g bower polyserve ``` -* Install local dependencies: +2. Install local dependencies: ```sh - $ bower install && npm install + $ bower install ``` -* To test your project, start the development server and open `http://localhost:8000`. +3. Start development server and open `http://localhost:8080/components/my-repo/`. ```sh - $ grunt server + $ polyserve ``` -* To provide a live demo, send everything to `gh-pages` branch. - - ```sh - $ grunt deploy - ``` - -## Contributing - -1. Fork it! -2. Create your feature branch: `git checkout -b my-new-feature` -3. Commit your changes: `git commit -m 'Add some feature'` -4. Push to the branch: `git push origin my-new-feature` -5. Submit a pull request :D - ## History For detailed changelog, check [Releases](https://github.com/my-user/my-repo/releases). diff --git a/bower.json b/bower.json index c3a764a..b6e8352 100644 --- a/bower.json +++ b/bower.json @@ -3,16 +3,15 @@ "version": "0.0.0", "description": "My awesome Custom Element", "license": "MIT", - "main": "src/my-element.html", + "main": "my-element.html", "keywords": [ "web-components" ], "ignore": [ "**/.*", - "node_modules", "bower_components" ], "dependencies": { - "platform": "Polymer/platform#~0.2.4" + "webcomponentsjs": "^0.7.2" } } diff --git a/index.html b/index.html index c04a77e..4903135 100644 --- a/index.html +++ b/index.html @@ -1,18 +1,20 @@ - + - + + <my-repo> - - + + + + + - - - + diff --git a/my-element.html b/my-element.html new file mode 100644 index 0000000..5741e31 --- /dev/null +++ b/my-element.html @@ -0,0 +1,28 @@ + diff --git a/package.json b/package.json deleted file mode 100644 index c2ba907..0000000 --- a/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "private": true, - "devDependencies": { - "grunt": "~0.4.1", - "grunt-cli": "~0.1.9", - "grunt-contrib-connect": "~0.5.0", - "grunt-gh-pages": "~0.9.1" - } -} diff --git a/src/my-element.html b/src/my-element.html deleted file mode 100644 index e7cd960..0000000 --- a/src/my-element.html +++ /dev/null @@ -1,22 +0,0 @@ -