Permalink
Browse files

chore: add meteor support

  • Loading branch information...
1 parent d07acb0 commit 32fcb8bcbb7f6fe7d186e4e5b6e95938c23da2a9 @kamilkisiela kamilkisiela committed Dec 14, 2015
Showing with 40 additions and 1 deletion.
  1. +12 −0 gulpfile.js
  2. +24 −0 package.js
  3. +4 −1 package.json
View
@@ -0,0 +1,12 @@
+const gulp = require('gulp')
+const replace = require('gulp-replace')
+
+// bump npm package version into package.js
+gulp.task('meteor', function() {
+ const pkg = require('./package.json')
+ const versionRegex = /(version\:\s*\')([^\']+)\'/gi
+
+ return gulp.src('package.js')
+ .pipe(replace(versionRegex, '$1' + pkg.version + "'"))
+ .pipe(gulp.dest('./'))
+})
View
@@ -0,0 +1,24 @@
+/* global packageFix:true Package:false */
+// package metadata file for AtmosphereJS
+
+try {
+ packageFix = Package
+
+ packageFix.describe({
+ name: 'formly:angular-formly',
+ summary: 'angular-formly (official): forms for AngularJS',
+ version: '0.0.0-semantically-released.0',
+ git: 'https://github.com/formly-js/angular-formly.git',
+ })
+
+ packageFix.onUse((api) => {
+ api.versionsFrom(['METEOR@1.0'])
+ api.use('wieldo:api-check@7.5.5')
+ api.addFiles('dist/formly.js', 'client')
+ })
+
+} catch (e) {
+ // little workaround...
+ // ghooks compiles this file and throws ReferenceError because
+ // Package is a global variable available only in Meteor environment
+}
View
@@ -38,7 +38,8 @@
"report-coverage": "cat ./coverage/lcov.info | node_modules/.bin/codecov",
"commit": "git-cz",
"publish-latest": "publish-latest --user-email kent+formly-bot@doddsfamily.us --user-name formly-bot",
- "semantic-release": "semantic-release pre && npm run build && npm publish && npm run publish-latest && semantic-release post"
+ "meteor": "gulp meteor",
+ "semantic-release": "semantic-release pre && npm run build && npm run meteor && npm publish && npm run publish-latest && semantic-release post"
},
"config": {
"ghooks": {
@@ -72,6 +73,8 @@
"eslint-loader": "1.1.0",
"eslint-plugin-mocha": "1.0.0",
"ghooks": "1.0.0",
+ "gulp": "3.9.0",
+ "gulp-replace": "0.5.4",
"http-server": "0.8.5",
"isparta": "3.1.0",
"isparta-loader": "1.0.0",

0 comments on commit 32fcb8b

Please sign in to comment.