Skip to content

Commit c678e74

Browse files
authored
Update build.js
1 parent cd3e0ba commit c678e74

File tree

1 file changed

+58
-31
lines changed

1 file changed

+58
-31
lines changed

packages/comet-build/build.js

+58-31
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,59 @@
1-
#!/usr/bin/env node
2-
import user from 'usr/repo/build';
3-
import repository from 'repo/usr';
4-
5-
generateBuild = (function(){
6-
var build = require('build');
7-
const startup = new user;
8-
build.status('on');
9-
if(build.status === 'on'){
10-
build.user = create({
11-
tools:'./tools',
12-
ices:'.ices'
13-
});
14-
}
15-
})(generateBuild);
16-
17-
repo.build = (function(){
18-
this.build = $(build);
19-
user.find(user, repository);
20-
$build.test(repository);
21-
22-
const newbuild = repo.add($build);
23-
const generate = new $build;
24-
})(repo.build);
25-
26-
module.exports = {
27-
export build;
28-
export repo.build;
29-
export newbuild;
30-
export generateBuild;
31-
};
1+
"use strict";
2+
// Copyright 2015 CometJS. All Rights Reserved.
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and limitations under the License.
13+
var build = require('.../tools/builder');
14+
/**
15+
* @description Use builder tool, and integrates with Gecko (XULRunner).
16+
* @param {geckoStartup, build, ices}
17+
* @requires gecko-dev, CometJS
18+
**/
19+
var geckoStartup = require('gecko-dev');
20+
var comet = require('CometJS');
21+
var ices = require('ices.js');
3222

23+
24+
25+
/** @protected **/
26+
geckoStartup.prototype.build('app');
27+
28+
//------------------------------------//
29+
30+
31+
32+
33+
/**
34+
* @interface Gives status, then prompts for a new build.
35+
* @instance
36+
**/
37+
const newBuild = ices.build.createElement('New Build');
38+
39+
40+
if(typeof newBuild === 'New Build' && NewBuild.status === 'StartingStart'){
41+
build.status.test('build', 'RunningState');
42+
}
43+
build.add(GeckoStartup.handle(newBuild), function(startBuild){
44+
var on = this.on;
45+
var generate = this.generate;
46+
comet.load(geckoStartup, build);
47+
48+
/** @protected **/
49+
while(comet.load(geckoStartup, build).status === 'ReadyState'){
50+
build.add(this.on);
51+
/** @fires {package} **/
52+
package build, geckoStartup;
53+
this.generate.createElement('generate-build');
54+
this.on.add(this.generate);
55+
}
56+
57+
})(startBuild);
58+
59+

0 commit comments

Comments
 (0)