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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d621c849b0128d6dc6065cb610d58e53f7b1feb
4
- data.tar.gz: 59bca794b37081633423439fee8065130cbc2f65
3
+ metadata.gz: f392350e3226bb0e35ad4727848f7d7ebe0c91f3
4
+ data.tar.gz: e20530117504a550eac839600ff2b870fdf77772
5
5
  SHA512:
6
- metadata.gz: 330ea794d666aa1f3a613c5192736c07bd1970fb62150d6fbc6d19b7bdeb3fe6ae567d2a852d75a215f001029325f28b798ee2ad544ffca009d8260408297362
7
- data.tar.gz: 57586c5a9c652a3f415c0e4ec95a84d04c51e8026e33939811b81b439eb9982e814f33a72fac2f105eef2a99338f0666081c52de810dcafa0b2e01b0e624eb54
6
+ metadata.gz: 49101a069cebfa8dfd5679e8c02e3a9664b6a946691b532d5f9a88ff5bd71301f88237849eb496ab6ffa5fb7e3d211ac35f2ded1587efad01b53ffe46c7826b8
7
+ data.tar.gz: 7ed38bcc6ebc8d52c536402f74d81749e3674ec548ff3943630a1448a27fcc0793dc99172e8a5a076853a75e3ac27253086fa7fb40e1f11ce740b081dd008853
data/bower.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joosy",
3
- "version": "1.2.0-alpha.7",
3
+ "version": "1.2.0-alpha.8",
4
4
  "main": "lib/joosy.js",
5
5
  "ignore": [
6
6
  "bin",
data/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [
5
5
  "joosy"
6
6
  ],
7
- "version": "1.2.0-alpha.7",
7
+ "version": "1.2.0-alpha.8",
8
8
  "author": "Boris Staal <boris@staal.io>",
9
9
  "bin": {
10
10
  "joosy": "bin/joosy"
@@ -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: (name, destination, templates) ->
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: (@name, destination, templates) ->
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: (@name) ->
7
- @standalone = new Standalone(@name)
8
- @base = new Base(@name, Path.join(@standalone.destination, 'source'))
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"],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: joosy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.alpha.7
4
+ version: 1.2.0.alpha.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Staal