Skip to content

Commit 97a1fc2

Browse files
committed
Updated third party libs, license, updated async
1 parent 494524c commit 97a1fc2

File tree

8 files changed

+4766
-1135
lines changed

8 files changed

+4766
-1135
lines changed

README.md

Lines changed: 19 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -105,59 +105,44 @@ The command line for doing this is basically:
105105
git clone https://github.com/gitana/alpaca.git
106106

107107

108-
### Prerequisites
108+
### Build
109109

110-
To build Alpaca, you will need to have Node.js, Gulp and Bower installed. If you're new to Node.js or Gulp, you could
111-
check out this writeup - http://travismaynard.com/writing/getting-started-with-gulp.
112-
113-
Once you have Node.js installed, you essentially need to do this:
114-
115-
npm install -g gulp
116-
npm install -g bower
117-
118-
Alpaca requires python 2.7.x to build some of it's node_module dependencies. Make sure you have this installed.
119-
If you're currently using Python 3.x, you will need to tell the build to use 2.7.x:
120-
121-
npm install --python=python2.7
122-
(or)
123-
npm config set python python2.7
124-
125-
126-
### Building Alpaca
110+
To build Alpaca, you will need to have Node.js installed.
127111

128112
Building Alpaca is pretty easy. Just run:
129113

130114
npm install
115+
116+
And then:
131117

132-
This will do the following for you:
118+
npm run build
119+
120+
This will build to `build/alpaca`
133121

134-
- pull down all of the Node module dependencies
135-
- run Bower to pull down client-side (browser) dependencies
122+
To clean the build:
136123

137-
To then build, you can do this:
124+
npm run clean
125+
138126

139-
npm start
127+
### Building the Web Site
140128

141-
If you want to use Gulp directly, you can alternatively run this:
129+
To build the web site, you will also need to have Python and Jekyll installed (as global dependencies).
142130

143-
gulp clean default
131+
You will then also need to install the `redcarpet` and `pygments.rb` gems, sort of like this:
144132

145-
Either ```npm start``` or ```gulp clean default``` will build everything.
146-
The build distribution assets will be in ```build/alpaca```.
133+
gem install redcarpet
134+
gem install pygments.rb
147135

136+
Then run:
148137

149-
### Building the Web Site and Running a local Web Server
138+
npm run site
150139

151-
Alpaca includes a web site along with documentation, samples and much more.
152-
To build the web site, you will first need to install Jekyll (not covered here).
153140

154-
Simply do this:
155-
156-
gulp site
141+
### Running a Local Web Server
157142

158143
And you can run a local web server like this:
159144

160-
gulp server
145+
npm run server
161146

162147

163148
### Alpaca Distributions
@@ -174,27 +159,6 @@ Each directory contains a JS file and a CSS file for its respective build.
174159
Each JS file is UMD ready and will work within both an AMD and CommonJS container.
175160

176161

177-
### Troubleshooting
178-
179-
If you run into any Bower related issues during the build, you might want to clear out your Bower cache using this
180-
command:
181-
182-
bower cache clean
183-
184-
And then try again.
185-
186-
187-
### Manual build commands
188-
189-
While ```npm install``` will pretty much do everything for you, there are also some manual commands you can run if you
190-
need to perform individual steps:
191-
192-
- To install Bower assets, do ```bower install```
193-
- To clear Bower cache, do ```bower cache clean```
194-
- To run the Gulp build, do ```gulp```
195-
- To build the Alpaca web site, do ```gulp default server```
196-
- To run a local Alpaca web server, ```gulp default server```
197-
198162

199163
## Contributors
200164

config/license.txt.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
Alpaca <%= version %>
33

4-
Copyright 2016 Gitana Software, Inc.
4+
Copyright 2019 Gitana Software, Inc.
55

66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.

gulpfile.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ var paths = {
4242
"thirdparty/base/Base.js",
4343

4444
"src/js/Alpaca.js",
45+
"src/js/Alpaca-async.js",
4546
"src/js/ObservableUtils.js",
4647
"src/js/Observables.js",
4748
"src/js/Observable.js",
@@ -411,23 +412,16 @@ gulp.task("build-scripts", function(cb) {
411412
.pipe(wrapUmd(web_wrap))
412413
.pipe(gulp.dest('build/alpaca/web'))
413414
.pipe(concat('alpaca.min.js'))
414-
.pipe(uglify())
415+
//.pipe(uglify())
415416
.pipe(gulp.dest('build/alpaca/web')),
416-
/*
417-
gulp.src(paths.scripts.web)
418-
.pipe(concat('alpaca-nobuilder.js'))
419-
.pipe(wrap(web_wrap))
420-
.pipe(stripper())
421-
.pipe(gulp.dest('build/alpaca/web')),
422-
*/
423417

424418
// bootstrap
425419
gulp.src(paths.scripts.bootstrap)
426420
.pipe(concat('alpaca.js'))
427421
.pipe(wrapUmd(bootstrap_wrap))
428422
.pipe(gulp.dest('build/alpaca/bootstrap'))
429423
.pipe(concat('alpaca.min.js'))
430-
.pipe(uglify())
424+
//.pipe(uglify())
431425
.pipe(gulp.dest('build/alpaca/bootstrap')),
432426

433427
// jqueryui
@@ -436,7 +430,7 @@ gulp.task("build-scripts", function(cb) {
436430
.pipe(wrapUmd(jqueryui_warp))
437431
.pipe(gulp.dest('build/alpaca/jqueryui'))
438432
.pipe(concat('alpaca.min.js'))
439-
.pipe(uglify())
433+
//.pipe(uglify())
440434
.pipe(gulp.dest('build/alpaca/jqueryui')),
441435

442436
// jquerymobile
@@ -445,7 +439,7 @@ gulp.task("build-scripts", function(cb) {
445439
.pipe(wrapUmd(jquerymobile_wrap))
446440
.pipe(gulp.dest('build/alpaca/jquerymobile'))
447441
.pipe(concat('alpaca.min.js'))
448-
.pipe(uglify())
442+
//.pipe(uglify())
449443
.pipe(gulp.dest('build/alpaca/jquerymobile'))
450444

451445
).pipe(es.wait(function() {

license.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
Alpaca 1.5.24
33

4-
Copyright 2016 Gitana Software, Inc.
4+
Copyright 2019 Gitana Software, Inc.
55

66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.

package.json

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"name": "alpaca",
33
"scripts": {
4-
"postinstall": "./node_modules/.bin/bower install --force",
5-
"postupdate": "./node_modules/.bin/bower update",
6-
"start": "./node_modules/.bin/gulp clean default"
4+
"build": "./node_modules/gulp/bin/gulp.js default",
5+
"site": "./node_modules/gulp/bin/gulp.js site",
6+
"server": "./node_modules/gulp/bin/gulp.js server",
7+
"clean": "./node_modules/gulp/bin/gulp.js clean"
78
},
89
"repository": {
910
"type": "git",
@@ -13,49 +14,48 @@
1314
"version": "1.5.24",
1415
"main": "dist/alpaca/bootstrap/alpaca.js",
1516
"devDependencies": {
16-
"bower": "*",
17-
"stream-browserify": "*",
17+
"bower": "^1.8.4",
1818
"cucumber": "~0.3.3",
19-
"event-stream": "*",
20-
"express": "3.5.1",
21-
"handlebars": "4.0.5",
22-
"grunt": "~0.4.x",
23-
"grunt-aws-s3": "^0.9.4",
24-
"grunt-cloudfront": "^0.2.0",
25-
"grunt-invalidate-cloudfront": "^0.1.5",
26-
"grunt-jsdoc": "^0.6.1",
27-
"gulp": "*",
28-
"gulp-awspublish": "0.0.23",
29-
"gulp-bump": "^0.1.11",
30-
"gulp-clean": "*",
31-
"gulp-concat": "*",
32-
"gulp-declare": "*",
33-
"gulp-handlebars": "4.0.0",
34-
"gulp-jshint": "*",
35-
"gulp-minify-css": "*",
36-
"gulp-nodemon": "*",
37-
"gulp-notify": "*",
38-
"gulp-order": "*",
39-
"gulp-rename": "*",
40-
"gulp-template": "^3.1.0",
41-
"gulp-uglify": "*",
42-
"gulp-util": "*",
43-
"gulp-watch": "*",
44-
"gulp-wrap": "^0.11.0",
45-
"gulp-wrap-umd": "^0.2.0",
46-
"jquery": "*",
19+
"event-stream": "^4.0.1",
20+
"express": "^4.16.4",
21+
"grunt": "^1.0.3",
22+
"grunt-aws-s3": "^2.0.0",
23+
"grunt-cloudfront": "^0.2.2",
24+
"grunt-invalidate-cloudfront": "^1.0.0",
25+
"grunt-jsdoc": "^2.3.0",
26+
"gulp": "^3.9.1",
27+
"gulp-awspublish": "^3.4.0",
28+
"gulp-bump": "^3.1.1",
29+
"gulp-clean": "^0.4.0",
30+
"gulp-concat": "^2.6.1",
31+
"gulp-declare": "^0.3.0",
32+
"gulp-handlebars": "^5.0.2",
33+
"gulp-jshint": "^2.1.0",
34+
"gulp-minify-css": "^1.2.4",
35+
"gulp-nodemon": "^2.4.2",
36+
"gulp-notify": "^3.2.0",
37+
"gulp-order": "^1.2.0",
38+
"gulp-rename": "^1.4.0",
39+
"gulp-template": "^5.0.0",
40+
"gulp-uglify": "^3.0.1",
41+
"gulp-util": "^3.0.8",
42+
"gulp-watch": "^5.0.1",
43+
"gulp-wrap": "^0.14.0",
44+
"gulp-wrap-umd": "^0.2.1",
45+
"handlebars": "^4.0.12",
46+
"jquery": "^3.3.1",
4747
"jsdom": "^9.12.0",
48-
"jshint": "*",
49-
"jshint-stylish": "*",
50-
"lodash": "*",
51-
"node-gyp": "*",
52-
"node-static": "*",
53-
"phantom": "0.6.3",
54-
"q": "^1.0.1",
55-
"run-sequence": "*",
56-
"through2": "*",
57-
"wd": "*",
58-
"wrench": "*"
59-
},
60-
"dependencies": {}
48+
"jshint": "^2.9.7",
49+
"jshint-stylish": "^2.2.1",
50+
"lodash": "^4.17.11",
51+
"node-gyp": "^3.8.0",
52+
"node-static": "^0.7.11",
53+
"phantom": "^6.0.3",
54+
"q": "^1.5.1",
55+
"run-sequence": "^2.2.1",
56+
"stream-browserify": "^2.0.1",
57+
"through2": "^3.0.0",
58+
"wd": "^1.11.1",
59+
"wrench": "^1.5.9"
60+
}
6161
}

server/webserver.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
var path = require('path');
2-
var express = require('express');
1+
var path = require("path");
2+
var express = require("express");
33

4-
var app = express();
5-
var publicDir = path.join(__dirname, '..', 'build', 'web');
6-
var port = process.env.PORT || 9999;
4+
var port = process.env.PORT || 9999;
75

8-
app.configure(function() {
9-
app.use(express.json());
10-
app.use(express.urlencoded());
11-
});
6+
var app = express();
7+
8+
var publicDir = path.join(__dirname, '..', 'build', 'web');
129

1310
app.use(express.static(publicDir));
1411

1512
app.listen(port, function() {
1613
console.log('App is now listening on port: ' + port);
1714
});
15+
16+
/*
17+
app.configure(function() {
18+
app.use(express.json());
19+
app.use(express.urlencoded());
20+
});
21+
22+
*/

0 commit comments

Comments
 (0)