joosy 1.2.0.alpha.5 → 1.2.0.alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bower.json +3 -2
- data/package.json +1 -1
- data/src/joosy/generators/base.coffee +4 -4
- data/src/joosy/generators/command.coffee +2 -1
- data/src/joosy/generators/layout.coffee +0 -1
- data/src/joosy/generators/page.coffee +0 -1
- data/src/joosy/generators/project.coffee +2 -1
- data/src/joosy/generators/project/base.coffee +0 -1
- data/src/joosy/generators/widget.coffee +0 -1
- 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: 63dc4c11964a51d88581fd3681b2a793c196b05d
|
4
|
+
data.tar.gz: 80f89f164658f7cc9bf7794cf3dd440073a46c64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
@@ -21,7 +21,7 @@ class Base
|
|
21
21
|
name.pop()
|
22
22
|
|
23
23
|
template: (source, destination, data) ->
|
24
|
-
source = @join(
|
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(
|
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
|
|
@@ -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()
|