File tree Expand file tree Collapse file tree 11 files changed +177
-77
lines changed Expand file tree Collapse file tree 11 files changed +177
-77
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " SpringRollStudio" ,
3
- "version" : " 0.2.3 " ,
3
+ "version" : " 0.2.4 " ,
4
4
"private" : true ,
5
5
"dependencies" : {
6
6
"jqueryui" : " *" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " Default" ,
3
3
"id" : " io.springroll.default" ,
4
- "version" : " 1.3.0 " ,
4
+ "version" : " 1.3.1 " ,
5
5
"github" : " SpringRoll/SpringRollTemplate" ,
6
6
"rename" : {
7
7
"gitignore" : " .gitignore" ,
61
61
},
62
62
{
63
63
"id" : " easeljs-interface" ,
64
- "name" : " EaselJS Animation " ,
64
+ "name" : " EaselJS Interface " ,
65
65
"description" : " Drag management and basic buttons for EaselJS" ,
66
66
"main" : " components/springroll/dist/modules/easeljs-interface.min.js" ,
67
67
"mainDebug" : " components/springroll/dist/modules/easeljs-interface.js" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " SpringRollStudio" ,
3
3
"description" : " Application for SpringRoll projects" ,
4
- "version" : " 0.2.3 " ,
4
+ "version" : " 0.2.4 " ,
5
5
"repository" : {
6
6
"type" : " git" ,
7
7
"url" : " https://github.com/SpringRoll/SpringRollStudio"
23
23
},
24
24
"dependencies" : {
25
25
"MD5" : " ~1.2.0" ,
26
- "adm-zip" : " ~0.4.4" ,
27
26
"ansi2html" : " ~0.0.1" ,
28
27
"connect" : " ^3.3.4" ,
29
28
"fs-extra" : " ~0.12.0" ,
35
34
"request" : " ^2.48.0" ,
36
35
"semver" : " ~4.0.3" ,
37
36
"serve-static" : " ^1.8.1" ,
37
+ "unzip" : " ^0.1.11" ,
38
38
"ws" : " ~0.4.32"
39
39
}
40
40
}
Original file line number Diff line number Diff line change 4
4
# These three must be integers
5
5
!define VERSIONMAJOR 0
6
6
!define VERSIONMINOR 2
7
- !define VERSIONBUILD 3
7
+ !define VERSIONBUILD 4
8
8
# These will be displayed by the "Click here for support information" link in "Add/Remove Programs"
9
9
# It is possible to use "mailto:" links in here to open the email client
10
10
!define HELPURL " https://github.com/SpringRoll/SpringRollStudio/issues"
Original file line number Diff line number Diff line change 4
4
# These three must be integers
5
5
!define VERSIONMAJOR 0
6
6
!define VERSIONMINOR 2
7
- !define VERSIONBUILD 3
7
+ !define VERSIONBUILD 4
8
8
# These will be displayed by the "Click here for support information" link in "Add/Remove Programs"
9
9
# It is possible to use "mailto:" links in here to open the email client
10
10
!define HELPURL " https://github.com/SpringRoll/SpringRollStudio/issues"
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " SpringRollStudio" ,
3
3
"private" : true ,
4
- "version" : " 0.2.3 " ,
4
+ "version" : " 0.2.4 " ,
5
5
"dependencies" : {
6
6
"grunt" : " ^0.4.5" ,
7
7
"grunt-contrib-copy" : " ^0.7.0" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " SpringRollStudio" ,
3
- "version" : " 0.2.3 " ,
3
+ "version" : " 0.2.4 " ,
4
4
"main" : [
5
5
" components/node-webkit-app/src/utils/UpdateChecker.js" ,
6
6
" components/node-webkit-app/src/utils/Browser.js" ,
77
77
" src/less/tasks/TaskRunner.less"
78
78
],
79
79
"new" : [
80
+ " src/js/new/Extract.js" ,
80
81
" src/js/new/JSONUtils.js" ,
81
82
" src/js/new/TemplateModule.js" ,
82
83
" src/js/new/Template.js" ,
Original file line number Diff line number Diff line change 23
23
| Drag template here.
24
24
.folder.center-vertical
25
25
.error.center-vertical
26
+ script#templateTemplate ( type ='text/html' )
27
+ <div class =" template" >
28
+ <span class =" name" ></span >
29
+ <button class =" btn btn-danger pull-right" >× ; </button >
30
+ </div >
26
31
#listTemplates .templates
27
- .template
28
- span.name Default
29
- button.btn.btn-default.disabled.pull-right ( disabled ='' ) ×
30
32
.form-horizontal ( role ='form' )
31
33
header
32
34
h1 Create New Project
Original file line number Diff line number Diff line change
1
+ ( function ( )
2
+ {
3
+ if ( APP )
4
+ {
5
+ var path = require ( 'path' ) ;
6
+ var fs = require ( 'fs-extra' ) ;
7
+ var unzip = require ( 'unzip' ) ;
8
+ }
9
+
10
+ /**
11
+ * Extract abstraction
12
+ * @class Extract
13
+ * @static
14
+ */
15
+ var Extract = { } ;
16
+
17
+ /**
18
+ * Extract a zip file
19
+ * @method run
20
+ * @static
21
+ * @param {String } zipPath The path to the zip file
22
+ * @param {String } outputPath The output folder
23
+ * @param {Function } callback Callback when completed or errored
24
+ */
25
+ Extract . run = function ( zipPath , outputPath , callback )
26
+ {
27
+ // Read the zipfile
28
+ fs . createReadStream ( zipPath )
29
+
30
+ // Parse the contents
31
+ . pipe ( unzip . Parse ( ) )
32
+
33
+ // Read each entry
34
+ . on ( 'entry' , function ( entry )
35
+ {
36
+ console . log ( entry . type + " :: " + entry . path ) ;
37
+
38
+ // remove the root directory which is <team>-<Repo>-<sha>
39
+ var localFile = entry . path . substr ( entry . path . indexOf ( '/' ) + 1 ) ;
40
+ var outputFile = path . join ( outputPath , localFile ) ;
41
+
42
+ if ( entry . type == "Directory" )
43
+ {
44
+ fs . mkdirsSync ( outputFile ) ;
45
+ }
46
+ else
47
+ {
48
+ console . log ( "Copy file " + outputFile ) ;
49
+
50
+ // Copy the file to output location
51
+ entry . pipe ( fs . createWriteStream ( outputFile ) ) ;
52
+ }
53
+ } )
54
+ . on ( 'close' , function ( )
55
+ {
56
+ console . log ( "Completed unzip" ) ;
57
+ callback ( ) ;
58
+ } ) ;
59
+ } ;
60
+
61
+ // Assign to namespace
62
+ namespace ( 'springroll.new' ) . Extract = Extract ;
63
+
64
+ } ( ) ) ;
You can’t perform that action at this time.
0 commit comments