Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial commit

  • Loading branch information...
commit 59850f94df03c435e6ad95ea2042265dcefdfdf9 0 parents
@jgallen23 jgallen23 authored
4 rename.json
@@ -0,0 +1,4 @@
+{
+ "lib/name.js": "lib/{%= name %}.js",
+ "test/name.test.js": "test/{%= name %}.test.js"
+}
1  root/README.md
@@ -0,0 +1 @@
+{%= name %}
10 root/component.json
@@ -0,0 +1,10 @@
+{
+ "name": "{%= name %}",
+ "description": "{%= description %}",
+ "version": "{%= version %}",
+ "homepage": "{%= homepage %}"
+ "license": "{%= licenses %}",
+ "copyright": "{%= author_name %}",
+ "dependencies": {
+ }
+}
11 root/example/index.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <title>{%= name %} example</title>
+ </head>
+ <body>
+
+ <script src="../dist/{%= name %}.js"></script>
+ </body>
+</html>
59 root/grunt.js
@@ -0,0 +1,59 @@
+module.exports = function(grunt) {
+ grunt.initConfig({
+ info: '<json:component.json>',
+ meta: {
+ banner: '/*!\n'+
+ ' * <%= info.name %> - <%= info.description %>\n'+
+ ' * v<%= info.version %>\n'+
+ ' * <%= info.homepage %>\n'+
+ ' * copyright <%= info.copyright %> <%= grunt.template.today("yyyy") %>\n'+
+ ' * <%= info.license %> License\n'+
+ '*/'
+ },
+ lint: {
+ all: [
+ 'grunt.js',
+ 'component.json',
+ 'lib/*.js',
+ 'test/*.js'
+ ]
+ },
+ concat: {
+ dist: {
+ src: [
+ '<banner>',
+ 'lib/{%= name %}.js'
+ ],
+ dest: 'dist/{%= name %}.js'
+ }
+ },
+ min: {
+ dist: {
+ src: [
+ '<banner>',
+ 'dist/{%= name %}.js'
+ ],
+ dest: 'dist/{%= name %}.min.js'
+ }
+ },
+ mocha: {
+ all: {
+ src: 'test/index.html',
+ run: true
+ }
+ },
+ watch: {
+ js: {
+ files: '<config:lint.all>',
+ tasks: 'default'
+ }
+ },
+ server:{
+ port: 8000,
+ base: '.'
+ }
+ });
+ grunt.loadNpmTasks('grunt-mocha');
+ grunt.registerTask('default', 'lint concat min mocha');
+ grunt.registerTask('dev', 'server watch');
+};
0  root/lib/name.js
No changes.
10 root/package.json
@@ -0,0 +1,10 @@
+{
+ "name": "{%= name %}",
+ "version": "0.0.0",
+ "private": true,
+ "devDependencies": {
+ "grunt": "~0.3.17",
+ "grunt-mocha": "~0.1.7",
+ "mocha": "~1.7.4"
+ }
+}
21 root/test/index.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>{%= name %} Tests</title>
+ <link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
+ <script src="../node_modules/mocha/mocha.js"></script>
+ <script>mocha.setup('tdd')</script>
+</head>
+<body>
+ <div id="mocha"></div>
+ <div id="fixture" style="display: none">
+
+ </div>
+ <script src="../dist/{%= name %}.js"></script>
+ <script src="{%= name %}.test.js"></script>
+ <script>
+ mocha.run()
+ </script>
+</body>
+</html>
0  root/test/name.test.js
No changes.
21 template.js
@@ -0,0 +1,21 @@
+
+exports.description = 'Javascript Lib for Bower';
+
+exports.warnOn = '*';
+
+exports.template = function(grunt, init, done) {
+
+ init.process({ type: 'bower' }, [
+ init.prompt('name'),
+ init.prompt('description'),
+ init.prompt('version'),
+ init.prompt('homepage'),
+ init.prompt('author_name'),
+ init.prompt('licenses')
+ ], function(err, props) {
+
+ var files = init.filesToCopy(props);
+ init.copyAndProcess(files, props);
+ done();
+ });
+};
Please sign in to comment.
Something went wrong with that request. Please try again.