joosy 1.2.0.alpha.5 → 1.2.0.alpha.6

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: 8395d61d74334b79dff75dfac8d41a983da6cd7d
4
- data.tar.gz: f8bc1d0db984fa3c4bd689a5ad00defe632c3f19
3
+ metadata.gz: 63dc4c11964a51d88581fd3681b2a793c196b05d
4
+ data.tar.gz: 80f89f164658f7cc9bf7794cf3dd440073a46c64
5
5
  SHA512:
6
- metadata.gz: bf279fa42a0b35c7fb01950e28af1f33701aa762ae82747b4854da0dd46bfd04e16dd4d56f81fed3c48ce7845b17973236f0846f155fc59d2c9028e1cb03d278
7
- data.tar.gz: 4a33c7dd7ff43dc198842f133d5ed2a31307f3f5173fc87b0aa431291334eca0e37d548f0194fa1a9b95ffc5a6db08998e7d25fc360c12b29a6ff63a4a2a2f7a
6
+ metadata.gz: 3266f0d3dae47fa2c7838e7ef53095ecd399ce802f30a822b6fa32ae9ff4ba052c1d4d8a214a5a8469dc6a586ffddaf69246dc6bd410f86cf57ae950097b80b2
7
+ data.tar.gz: 552f138af8a3ee7fd48d38d25c82982e9f11e389b0a98c38904b99f12c2209fdc859b5d2f7760462025d260e0a3f08f299f28e5e9ed2628e29728fbdb69b0fef
data/bower.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joosy",
3
- "version": "1.2.0-alpha.5",
3
+ "version": "1.2.0-alpha.6",
4
4
  "main": "lib/joosy.js",
5
5
  "ignore": [
6
6
  "bin",
@@ -10,7 +10,8 @@
10
10
  "Gemfile",
11
11
  "Gruntfile.coffee",
12
12
  "joosy.gemspec",
13
- "package.json"
13
+ "package.json",
14
+ "lib/**/*.rb"
14
15
  ],
15
16
  "dependencies": {
16
17
  "jquery": "~2.0.2",
data/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [
5
5
  "joosy"
6
6
  ],
7
- "version": "1.2.0-alpha.5",
7
+ "version": "1.2.0-alpha.6",
8
8
  "author": "Boris Staal <boris@staal.io>",
9
9
  "bin": {
10
10
  "joosy": "bin/joosy"
@@ -21,7 +21,7 @@ class Base
21
21
  name.pop()
22
22
 
23
23
  template: (source, destination, data) ->
24
- source = @join(@templates, source...) if source instanceof Array
24
+ source = @join(source...) if source instanceof Array
25
25
  destination = @join(destination...) if destination instanceof Array
26
26
 
27
27
  @actions.push ['template', destination, source, data]
@@ -32,7 +32,7 @@ class Base
32
32
  @actions.push ['file', destination, content]
33
33
 
34
34
  copy: (source, destination) ->
35
- source = @join(@templates, source...) if source instanceof Array
35
+ source = @join(source...) if source instanceof Array
36
36
  destination = @join(destination...) if destination instanceof Array
37
37
 
38
38
  @actions.push ['copy', destination, source]
@@ -75,7 +75,7 @@ class Base
75
75
 
76
76
  performCopyAction: (callback, destination, source) ->
77
77
  write = =>
78
- File.copy source, @join(@destination, destination)
78
+ File.copy @join(@templates, source), @join(@destination, destination)
79
79
  Log.ok "#{destination} copied..."
80
80
 
81
81
  if File.exists(@destination, destination)
@@ -100,7 +100,7 @@ class Base
100
100
  callback()
101
101
 
102
102
  performTemplateAction: (callback, destination, source, data) ->
103
- @performFileAction callback, destination, @compileTemplate(source, data)
103
+ @performFileAction callback, destination, @compileTemplate(@join(@templates, source), data)
104
104
 
105
105
  if module?
106
106
  module.exports = Base
@@ -3,6 +3,7 @@ module.exports = ->
3
3
  cli = require 'command-router'
4
4
  meta = require '../../../package.json'
5
5
  grunt = require 'grunt'
6
+ path = require 'path'
6
7
 
7
8
  cli.command /new\s?(.*)?/, ->
8
9
  name = cli.params.splats[0]
@@ -36,7 +37,7 @@ module.exports = ->
36
37
  process.exit 1
37
38
 
38
39
  generator = require("./#{entity}")
39
- generator = new generator(name)
40
+ generator = new generator(name, path.join(process.cwd(), 'source'))
40
41
  generator.generate()
41
42
  generator.perform -> process.exit 0
42
43
 
@@ -3,7 +3,6 @@
3
3
  class Layout extends @Base
4
4
  constructor: (@name, destination, templates) ->
5
5
  super(destination, templates)
6
- @destination = @join @destination, 'source'
7
6
 
8
7
  generate: ->
9
8
  namespace = @getNamespace @name
@@ -3,7 +3,6 @@
3
3
  class Page extends @Base
4
4
  constructor: (@name, destination, templates) ->
5
5
  super(destination, templates)
6
- @destination = @join @destination, 'source'
7
6
 
8
7
  generate: ->
9
8
  namespace = @getNamespace @name
@@ -1,10 +1,11 @@
1
1
  Standalone = require './project/standalone'
2
2
  Base = require './project/base'
3
+ Path = require 'path'
3
4
 
4
5
  module.exports = class
5
6
  constructor: (@name) ->
6
7
  @standalone = new Standalone(@name)
7
- @base = new Base(@name, @standalone.destination)
8
+ @base = new Base(@name, Path.join(@standalone.destination, 'source'))
8
9
 
9
10
  generate: ->
10
11
  @standalone.generate()
@@ -4,7 +4,6 @@ class ProjectBase extends @Base
4
4
  constructor: (name, destination, templates) ->
5
5
  super(destination, templates)
6
6
  @name = name.split('/').pop()
7
- @destination = @join @destination, 'source'
8
7
 
9
8
  generate: ->
10
9
  @file ['resources', '.gitkeep']
@@ -3,7 +3,6 @@
3
3
  class Widget extends @Base
4
4
  constructor: (@name, destination, templates) ->
5
5
  super(destination, templates)
6
- @destination = @join @destination, 'source'
7
6
 
8
7
  generate: ->
9
8
  namespace = @getNamespace @name
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.5
4
+ version: 1.2.0.alpha.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Staal