joosy 1.2.0.alpha.7 → 1.2.0.alpha.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bower.json +1 -1
- data/package.json +1 -1
- data/src/joosy/generators/base.coffee +1 -1
- data/src/joosy/generators/command.coffee +2 -2
- data/src/joosy/generators/layout.coffee +7 -5
- data/src/joosy/generators/page.coffee +7 -5
- data/src/joosy/generators/project/base.coffee +9 -4
- data/src/joosy/generators/project/standalone.coffee +8 -3
- data/src/joosy/generators/project.coffee +3 -3
- data/src/joosy/generators/widget.coffee +7 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f392350e3226bb0e35ad4727848f7d7ebe0c91f3
|
4
|
+
data.tar.gz: e20530117504a550eac839600ff2b870fdf77772
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49101a069cebfa8dfd5679e8c02e3a9664b6a946691b532d5f9a88ff5bd71301f88237849eb496ab6ffa5fb7e3d211ac35f2ded1587efad01b53ffe46c7826b8
|
7
|
+
data.tar.gz: 7ed38bcc6ebc8d52c536402f74d81749e3674ec548ff3943630a1448a27fcc0793dc99172e8a5a076853a75e3ac27253086fa7fb40e1f11ce740b081dd008853
|
data/bower.json
CHANGED
data/package.json
CHANGED
@@ -6,7 +6,7 @@ if module?
|
|
6
6
|
Commander = require('commander')
|
7
7
|
|
8
8
|
class Base
|
9
|
-
constructor: (@destination, @templates) ->
|
9
|
+
constructor: (@options, @destination, @templates) ->
|
10
10
|
@destination ||= process?.cwd()
|
11
11
|
@templates ||= @join(__dirname, '..', '..', '..', 'templates') if __dirname?
|
12
12
|
@actions = []
|
@@ -13,7 +13,7 @@ module.exports = ->
|
|
13
13
|
process.exit(1)
|
14
14
|
|
15
15
|
generator = require('./project')
|
16
|
-
generator = new generator(name)
|
16
|
+
generator = new generator(name: name)
|
17
17
|
generator.generate()
|
18
18
|
generator.perform -> process.exit 0
|
19
19
|
|
@@ -37,7 +37,7 @@ module.exports = ->
|
|
37
37
|
process.exit 1
|
38
38
|
|
39
39
|
generator = require("./#{entity}")
|
40
|
-
generator = new generator(name, path.join(process.cwd(), 'source'))
|
40
|
+
generator = new generator({name: name}, path.join(process.cwd(), 'source'))
|
41
41
|
generator.generate()
|
42
42
|
generator.perform -> process.exit 0
|
43
43
|
|
@@ -1,12 +1,14 @@
|
|
1
1
|
@Base = require './base' if module?
|
2
2
|
|
3
|
+
#
|
4
|
+
# Possible options:
|
5
|
+
#
|
6
|
+
# name: name of layout including namespace (i.e. 'foo/bar/baz')
|
7
|
+
#
|
3
8
|
class Layout extends @Base
|
4
|
-
constructor: (@name, destination, templates) ->
|
5
|
-
super(destination, templates)
|
6
|
-
|
7
9
|
generate: ->
|
8
|
-
namespace = @getNamespace @name
|
9
|
-
basename = @getBasename @name
|
10
|
+
namespace = @getNamespace @options.name
|
11
|
+
basename = @getBasename @options.name
|
10
12
|
template = if namespace.length > 0 then 'namespaced' else 'basic'
|
11
13
|
|
12
14
|
@template ['layout', "#{template}.coffee"], ['layouts', @join(namespace...), "#{basename}.coffee"],
|
@@ -1,12 +1,14 @@
|
|
1
1
|
@Base = require './base' if module?
|
2
2
|
|
3
|
+
#
|
4
|
+
# Possible options:
|
5
|
+
#
|
6
|
+
# name: name of page including namespace (i.e. 'foo/bar/baz')
|
7
|
+
#
|
3
8
|
class Page extends @Base
|
4
|
-
constructor: (@name, destination, templates) ->
|
5
|
-
super(destination, templates)
|
6
|
-
|
7
9
|
generate: ->
|
8
|
-
namespace = @getNamespace @name
|
9
|
-
basename = @getBasename @name
|
10
|
+
namespace = @getNamespace @options.name
|
11
|
+
basename = @getBasename @options.name
|
10
12
|
template = if namespace.length > 0 then 'namespaced' else 'basic'
|
11
13
|
|
12
14
|
@template ['page', "#{template}.coffee"], ['pages', @join(namespace...), "#{basename}.coffee"],
|
@@ -1,9 +1,14 @@
|
|
1
1
|
@Base = require '../base' if module?
|
2
2
|
|
3
|
+
#
|
4
|
+
# Possible options:
|
5
|
+
#
|
6
|
+
# name: name of project
|
7
|
+
#
|
3
8
|
class ProjectBase extends @Base
|
4
|
-
constructor: (
|
5
|
-
super(destination, templates)
|
6
|
-
@name = name.split('/').pop()
|
9
|
+
constructor: (@options, destination, templates) ->
|
10
|
+
super(@options, destination, templates)
|
11
|
+
@options.name = @options.name.split('/').pop()
|
7
12
|
|
8
13
|
generate: ->
|
9
14
|
@file ['resources', '.gitkeep']
|
@@ -23,7 +28,7 @@ class ProjectBase extends @Base
|
|
23
28
|
|
24
29
|
|
25
30
|
@template ['application', 'base', 'application.coffee'], ['application.coffee'],
|
26
|
-
application: @name
|
31
|
+
application: @options.name
|
27
32
|
|
28
33
|
@actions
|
29
34
|
|
@@ -1,9 +1,14 @@
|
|
1
1
|
@Base = require '../base' if module?
|
2
2
|
|
3
|
+
#
|
4
|
+
# Possible options:
|
5
|
+
#
|
6
|
+
# name: name of project
|
7
|
+
#
|
3
8
|
class ProjectStandalone extends @Base
|
4
|
-
constructor: (@
|
5
|
-
destination = @join process.cwd(), @name if !destination? && process?
|
6
|
-
super(destination, templates)
|
9
|
+
constructor: (@options, destination, templates) ->
|
10
|
+
destination = @join process.cwd(), @options.name if !destination? && process?
|
11
|
+
super(@options, destination, templates)
|
7
12
|
|
8
13
|
generate: ->
|
9
14
|
@file ['public', '.gitkeep']
|
@@ -3,9 +3,9 @@ Base = require './project/base'
|
|
3
3
|
Path = require 'path'
|
4
4
|
|
5
5
|
module.exports = class
|
6
|
-
constructor: (@
|
7
|
-
@standalone = new Standalone(@
|
8
|
-
@base = new Base(@
|
6
|
+
constructor: (@options) ->
|
7
|
+
@standalone = new Standalone(@options)
|
8
|
+
@base = new Base(@options, Path.join(@standalone.destination, 'source'))
|
9
9
|
|
10
10
|
generate: ->
|
11
11
|
@standalone.generate()
|
@@ -1,12 +1,14 @@
|
|
1
1
|
@Base = require './base' if module?
|
2
2
|
|
3
|
+
#
|
4
|
+
# Possible options:
|
5
|
+
#
|
6
|
+
# name: name of widget including namespace (i.e. 'foo/bar/baz')
|
7
|
+
#
|
3
8
|
class Widget extends @Base
|
4
|
-
constructor: (@name, destination, templates) ->
|
5
|
-
super(destination, templates)
|
6
|
-
|
7
9
|
generate: ->
|
8
|
-
namespace = @getNamespace @name
|
9
|
-
basename = @getBasename @name
|
10
|
+
namespace = @getNamespace @options.name
|
11
|
+
basename = @getBasename @options.name
|
10
12
|
template = if namespace.length > 0 then 'namespaced' else 'basic'
|
11
13
|
|
12
14
|
@template ['widget', "#{template}.coffee"], ['widgets', @join(namespace...), "#{basename}.coffee"],
|