Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

Commit 32fcb8b

Browse files
author
Kamil Kisiela
committed
chore: add meteor support
1 parent d07acb0 commit 32fcb8b

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

gulpfile.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const gulp = require('gulp')
2+
const replace = require('gulp-replace')
3+
4+
// bump npm package version into package.js
5+
gulp.task('meteor', function() {
6+
const pkg = require('./package.json')
7+
const versionRegex = /(version\:\s*\')([^\']+)\'/gi
8+
9+
return gulp.src('package.js')
10+
.pipe(replace(versionRegex, '$1' + pkg.version + "'"))
11+
.pipe(gulp.dest('./'))
12+
})

package.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* global packageFix:true Package:false */
2+
// package metadata file for AtmosphereJS
3+
4+
try {
5+
packageFix = Package
6+
7+
packageFix.describe({
8+
name: 'formly:angular-formly',
9+
summary: 'angular-formly (official): forms for AngularJS',
10+
version: '0.0.0-semantically-released.0',
11+
git: 'https://github.com/formly-js/angular-formly.git',
12+
})
13+
14+
packageFix.onUse((api) => {
15+
api.versionsFrom(['[email protected]'])
16+
api.use('wieldo:[email protected]')
17+
api.addFiles('dist/formly.js', 'client')
18+
})
19+
20+
} catch (e) {
21+
// little workaround...
22+
// ghooks compiles this file and throws ReferenceError because
23+
// Package is a global variable available only in Meteor environment
24+
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"report-coverage": "cat ./coverage/lcov.info | node_modules/.bin/codecov",
3939
"commit": "git-cz",
4040
"publish-latest": "publish-latest --user-email [email protected] --user-name formly-bot",
41-
"semantic-release": "semantic-release pre && npm run build && npm publish && npm run publish-latest && semantic-release post"
41+
"meteor": "gulp meteor",
42+
"semantic-release": "semantic-release pre && npm run build && npm run meteor && npm publish && npm run publish-latest && semantic-release post"
4243
},
4344
"config": {
4445
"ghooks": {
@@ -72,6 +73,8 @@
7273
"eslint-loader": "1.1.0",
7374
"eslint-plugin-mocha": "1.0.0",
7475
"ghooks": "1.0.0",
76+
"gulp": "3.9.0",
77+
"gulp-replace": "0.5.4",
7578
"http-server": "0.8.5",
7679
"isparta": "3.1.0",
7780
"isparta-loader": "1.0.0",

0 commit comments

Comments
 (0)