new 0.1.1 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/bin/new +0 -2
- data/lib/new.rb +125 -52
- data/lib/new/cli.rb +514 -67
- data/lib/new/source.rb +110 -0
- data/lib/new/task.rb +67 -24
- data/lib/new/validation.rb +191 -0
- metadata +75 -132
- data/.gitignore +0 -6
- data/.new +0 -23
- data/.rspec +0 -2
- data/Gemfile +0 -16
- data/Gemfile.lock +0 -82
- data/Guardfile +0 -16
- data/LICENSE.txt +0 -22
- data/README.md +0 -128
- data/lib/new/core.rb +0 -7
- data/lib/new/dsl.rb +0 -42
- data/lib/new/interpolate.rb +0 -106
- data/lib/new/project.rb +0 -34
- data/lib/new/template.rb +0 -67
- data/lib/new/version.rb +0 -54
- data/spec/fixtures/custom/.new +0 -16
- data/spec/fixtures/custom/tasks/custom_bar_task/custom_bar_task.rb +0 -3
- data/spec/fixtures/custom/templates/custom_bar_template/.new +0 -3
- data/spec/fixtures/custom/templates/custom_bar_template/custom_bar.txt +0 -0
- data/spec/fixtures/project/.new +0 -4
- data/spec/fixtures/project/.new_cli_release_spec +0 -2
- data/spec/fixtures/tasks/custom_bar_task/custom_bar_task.rb +0 -1
- data/spec/fixtures/tasks/foo_task/Gemfile +0 -5
- data/spec/fixtures/tasks/foo_task/foo_task.rb +0 -7
- data/spec/fixtures/templates/custom_bar_template/.gitkeep +0 -0
- data/spec/fixtures/templates/foo_template/.new +0 -1
- data/spec/fixtures/templates/foo_template/[FOO.BAR].txt.erb +0 -1
- data/spec/fixtures/templates/foo_template/nested_[FOO.BAR]/foo.txt.erb +0 -1
- data/spec/lib/new/cli_spec.rb +0 -107
- data/spec/lib/new/interpolate_spec.rb +0 -43
- data/spec/lib/new/project_spec.rb +0 -33
- data/spec/lib/new/task_spec.rb +0 -39
- data/spec/lib/new/template_spec.rb +0 -59
- data/spec/lib/new/version_spec.rb +0 -26
- data/spec/lib/new_spec.rb +0 -19
- data/spec/spec_helper.rb +0 -46
- data/tasks/gem/.gemspec.erb +0 -4
- data/tasks/gem/README.md +0 -36
- data/tasks/gem/gem.rb +0 -170
- data/tasks/gem/gem_spec.rb +0 -138
- data/templates/js/.bowerrc +0 -3
- data/templates/js/.gitignore +0 -3
- data/templates/js/.new.erb +0 -11
- data/templates/js/CHANGELOG.md +0 -3
- data/templates/js/Gemfile +0 -2
- data/templates/js/Guardfile +0 -7
- data/templates/js/LICENSE-MIT.erb +0 -22
- data/templates/js/README.md.erb +0 -41
- data/templates/js/bower.json.erb +0 -11
- data/templates/js/demo/[PROJECT.FILENAME]_demo.coffee +0 -0
- data/templates/js/demo/[PROJECT.FILENAME]_demo.sass +0 -0
- data/templates/js/demo/index.html.erb +0 -12
- data/templates/js/lib/README.md +0 -2
- data/templates/js/package.json +0 -5
- data/templates/js/spec/[PROJECT.FILENAME]_spec.coffee.erb +0 -1
- data/templates/js/spec/[PROJECT.FILENAME]_spec.sass +0 -0
- data/templates/js/spec/index.html.erb +0 -35
- data/templates/js/src/[PROJECT.FILENAME].coffee.erb +0 -18
- data/templates/js/src/[PROJECT.FILENAME].sass +0 -0
- data/templates/js/testem.yml +0 -23
- data/templates/js/yuyi_menu +0 -7
data/templates/js/.bowerrc
DELETED
data/templates/js/.gitignore
DELETED
data/templates/js/.new.erb
DELETED
data/templates/js/CHANGELOG.md
DELETED
data/templates/js/Gemfile
DELETED
data/templates/js/Guardfile
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
# Source
|
2
|
-
guard :coffeescript, input: 'src', output: 'lib', hide_success: true
|
3
|
-
guard :sass, input: 'src', :noop => true
|
4
|
-
|
5
|
-
# Tests
|
6
|
-
guard :coffeescript, input: 'spec', output: '.tmp', hide_success: true
|
7
|
-
guard :sass, input: 'spec', output: '.tmp', hide_success: true
|
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) <%= Date.today.year %> <%= developer.name %>
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person
|
4
|
-
obtaining a copy of this software and associated documentation
|
5
|
-
files (the "Software"), to deal in the Software without
|
6
|
-
restriction, including without limitation the rights to use,
|
7
|
-
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
copies of the Software, and to permit persons to whom the
|
9
|
-
Software is furnished to do so, subject to the following
|
10
|
-
conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be
|
13
|
-
included in all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
17
|
-
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
19
|
-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
20
|
-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
data/templates/js/README.md.erb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
# <%= project.name %>
|
2
|
-
|
3
|
-
## Dependencies
|
4
|
-
*
|
5
|
-
|
6
|
-
## Usage
|
7
|
-
|
8
|
-
#### Methods
|
9
|
-
|
10
|
-
###### METHOD NAME
|
11
|
-
_METHOD DESCRIPTION_
|
12
|
-
> _Arguments_
|
13
|
-
```yaml
|
14
|
-
argument: Argument description # default:
|
15
|
-
```
|
16
|
-
|
17
|
-
---
|
18
|
-
> _example_
|
19
|
-
```coffee
|
20
|
-
METHOD ARGUMENT
|
21
|
-
```
|
22
|
-
|
23
|
-
## Development
|
24
|
-
|
25
|
-
### Dependencies
|
26
|
-
|
27
|
-
```shell
|
28
|
-
gem install yuyi
|
29
|
-
yuyi -m https://raw.githubusercontent.com/<%= github.username %>/<%= project.filename %>/master/yuyi_menu
|
30
|
-
bundle install
|
31
|
-
npm install
|
32
|
-
bower install
|
33
|
-
```
|
34
|
-
|
35
|
-
Do **NOT** modify any `.js` files! Modify the coffee files in the `src` directory. Guard will watch for changes and compile them to the `lib` directory.
|
36
|
-
|
37
|
-
### Compiling & Testing
|
38
|
-
Run `testem`
|
39
|
-
|
40
|
-
## To-Do
|
41
|
-
*
|
data/templates/js/bower.json.erb
DELETED
File without changes
|
File without changes
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title><%= project.name %></title>
|
4
|
-
<link type="text/css" rel="stylesheet" media="all" href="../lib/<%= project.filename %>.css"/>
|
5
|
-
<link type="text/css" rel="stylesheet" media="all" href="<%= project.filename %>_demo.css"/>
|
6
|
-
</head>
|
7
|
-
<body>
|
8
|
-
</body>
|
9
|
-
|
10
|
-
<script type="text/javascript" src="../lib/<%= project.filename %>.js"></script>
|
11
|
-
<script type="text/javascript" src="<%= project.filename %>_demo.js"></script>
|
12
|
-
</html>
|
data/templates/js/lib/README.md
DELETED
data/templates/js/package.json
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
describe '<%= project.name %>', ->
|
File without changes
|
@@ -1,35 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<link rel="stylesheet" href="/vendor/mocha/mocha.css">
|
4
|
-
<link rel="stylesheet" href="/lib/<%= project.filename %>.css">
|
5
|
-
<link rel="stylesheet" href="/.tmp/<%= project.filename %>_spec.css">
|
6
|
-
</head>
|
7
|
-
|
8
|
-
<body>
|
9
|
-
<div id='mocha'></div>
|
10
|
-
|
11
|
-
<!-- Test Fixtures -->
|
12
|
-
</body>
|
13
|
-
|
14
|
-
<!-- Dependencies -->
|
15
|
-
|
16
|
-
<!-- Testing -->
|
17
|
-
<script src="/vendor/mocha/mocha.js"></script>
|
18
|
-
<script src="/vendor/chai/chai.js"></script>
|
19
|
-
<script src="/vendor/sinon/lib/sinon.js"></script>
|
20
|
-
<script src="/vendor/sinon/lib/sinon/call.js"></script>
|
21
|
-
<script src="/vendor/sinon/lib/sinon/spy.js"></script>
|
22
|
-
<script src="/vendor/sinon-chai/lib/sinon-chai.js"></script>
|
23
|
-
<script src="/testem.js"></script>
|
24
|
-
<script>
|
25
|
-
mocha.setup('bdd');
|
26
|
-
window.expect = chai.expect;
|
27
|
-
</script>
|
28
|
-
|
29
|
-
<script src="/lib/<%= project.filename %>.js"></script>
|
30
|
-
<script src="/.tmp/<%= project.filename %>_spec.js"></script>
|
31
|
-
|
32
|
-
<script>
|
33
|
-
mocha.run()
|
34
|
-
</script>
|
35
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
###
|
2
|
-
# * <%= project.name %>
|
3
|
-
# * https://github.com/<%= github.username %>/<%= project.filename %>
|
4
|
-
# *
|
5
|
-
# * @version <%= version %>
|
6
|
-
# * @author <%= developer.name %>
|
7
|
-
# * Copyright (c) <%= Date.today.year %>
|
8
|
-
# * Licensed under the <%= license %> license.
|
9
|
-
###
|
10
|
-
|
11
|
-
((root, factory) ->
|
12
|
-
if typeof define == 'function' && define.amd
|
13
|
-
define [], ->
|
14
|
-
factory()
|
15
|
-
else
|
16
|
-
factory()
|
17
|
-
) @, ->
|
18
|
-
# script
|
File without changes
|
data/templates/js/testem.yml
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
test_page: spec/index.html
|
2
|
-
before_tests: |
|
3
|
-
bundle exec coffee -co lib src/*.coffee
|
4
|
-
bundle exec coffee -co .tmp spec/*.coffee
|
5
|
-
bundle exec coffee -co demo demo/*.coffee
|
6
|
-
bundle exec sass --update src:lib
|
7
|
-
bundle exec sass --update spec:.tmp
|
8
|
-
bundle exec sass --update demo:demo
|
9
|
-
src_files:
|
10
|
-
- demo/*_demo.coffee
|
11
|
-
- demo/*_demo.sass
|
12
|
-
- spec/*_spec.coffee
|
13
|
-
- spec/*_spec.sass
|
14
|
-
- spec/index.html
|
15
|
-
- src/*.coffee
|
16
|
-
- src/*.sass
|
17
|
-
serve_files:
|
18
|
-
- .tmp/*.js
|
19
|
-
- lib/*.js
|
20
|
-
launch_in_dev:
|
21
|
-
- phantomjs
|
22
|
-
launch_in_ci:
|
23
|
-
- phantomjs
|