Commit 4d06228d authored by JC Brand's avatar JC Brand

Various changes around making builds.

- Update build scripts to use transpiled versions of newly added modules
- Stop building locales.js and remove locales stuff from build scripts
- No need for Grunt anymore since we don't need to make locales.js
parent 042a26d0
module.exports = function(grunt) {
grunt.initConfig({
json: {
main: {
options: {
namespace: 'locales',
includePath: true,
processName: function(filename) {
return filename.toLowerCase().match(/^locale\/(.*)\/lc_messages/)[1];
}
},
src: ['locale/**/LC_MESSAGES/*.json'],
dest: 'dist/locales.js'
}
}
});
grunt.loadNpmTasks('grunt-json');
};
......@@ -7,7 +7,6 @@ BUNDLE ?= ./.bundle/bin/bundle
CHROMIUM ?= ./node_modules/.bin/run-headless-chromium
CLEANCSS ?= ./node_modules/clean-css-cli/bin/cleancss --skip-rebase
ESLINT ?= ./node_modules/.bin/eslint
GRUNT ?= ./node_modules/.bin/grunt
HTTPSERVE ?= ./node_modules/.bin/http-server
PAPER =
PO2JSON ?= ./node_modules/.bin/po2json
......@@ -167,37 +166,32 @@ BUILDS = dist/converse.js \
dist/converse-no-dependencies.min.js \
dist/converse-no-dependencies.js
dist/converse.js: transpile src node_modules *.js
dist/converse.js: transpile src node_modules
$(RJS) -o src/build.js include=converse out=dist/converse.js optimize=none
dist/converse.min.js: transpile src node_modules *.js
dist/converse.min.js: transpile src node_modules
$(RJS) -o src/build.js include=converse out=dist/converse.min.js
dist/converse-esnext.js: src node_modules *.js
dist/converse-esnext.js: src node_modules
$(RJS) -o src/build-esnext.js include=converse out=dist/converse-esnext.js optimize=none
dist/converse-esnext.min.js: src node_modules *.js
dist/converse-esnext.min.js: src node_modules
$(RJS) -o src/build-esnext.js include=converse out=dist/converse-esnext.min.js
dist/converse-no-jquery.js: transpile src node_modules *.js
dist/converse-no-jquery.js: transpile src node_modules
$(RJS) -o src/build.js include=converse wrap.endFile=end-no-jquery.frag exclude=jquery exclude=jquery.noconflict out=dist/converse-no-jquery.js optimize=none
dist/converse-no-jquery.min.js: transpile src node_modules *.js transpile
dist/converse-no-jquery.min.js: transpile src node_modules transpile
$(RJS) -o src/build.js include=converse wrap.endFile=end-no-jquery.frag exclude=jquery exclude=jquery.noconflict out=dist/converse-no-jquery.min.js
dist/converse-no-dependencies.js: transpile src node_modules *.js
dist/converse-no-dependencies.js: transpile src node_modules
$(RJS) -o src/build-no-dependencies.js optimize=none out=dist/converse-no-dependencies.js
dist/converse-no-dependencies.min.js: transpile src node_modules *.js
dist/converse-no-dependencies.min.js: transpile src node_modules
$(RJS) -o src/build-no-dependencies.js out=dist/converse-no-dependencies.min.js
dist/converse-muc-embedded.js: transpile src node_modules *.js
dist/converse-muc-embedded.js: transpile src node_modules
$(RJS) -o src/build.js paths.converse=src/converse-embedded include=converse out=dist/converse-muc-embedded.js optimize=none
dist/converse-muc-embedded.min.js: transpile src node_modules *.js
dist/converse-muc-embedded.min.js: transpile src node_modules
$(RJS) -o src/build.js paths.converse=src/converse-embedded include=converse out=dist/converse-muc-embedded.min.js
.PHONY: jsmin
jsmin: $(BUILDS)
.PHONY: dist
dist:: build
.PHONY: build
build:: dev css transpile
$(GRUNT) json
make jsmin
build:: dev css transpile $(BUILDS)
########################################################################
## Tests
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
({
baseUrl: "../",
name: "almond",
mainConfigFile: 'config.js',
wrap: {
startFile: "start.frag",
endFile: "inverse-end.frag"
}
})
({
baseUrl: "../",
name: "almond",
mainConfigFile: 'config.js',
paths: {
"converse-bookmarks": "builds/converse-bookmarks",
"converse-chatboxes": "builds/converse-chatboxes",
"converse-chatview": "builds/converse-chatview",
"converse-controlbox": "builds/converse-controlbox",
"converse-core": "builds/converse-core",
"converse-disco": "builds/converse-disco",
"converse-dragresize": "builds/converse-dragresize",
"converse-headline": "builds/converse-headline",
"converse-inverse": "builds/converse-inverse",
"converse-mam": "builds/converse-mam",
"converse-minimize": "builds/converse-minimize",
"converse-muc": "builds/converse-muc",
"converse-muc-embedded": "builds/converse-muc-embedded",
"converse-notification": "builds/converse-notification",
"converse-otr": "builds/converse-otr",
"converse-ping": "builds/converse-ping",
"converse-register": "builds/converse-register",
"converse-roomslist": "builds/converse-roomslist",
"converse-rosterview": "builds/converse-rosterview",
"converse-singleton": "builds/converse-singleton",
"converse-vcard": "builds/converse-vcard",
"utils": "builds/utils"
},
wrap: {
startFile: "start.frag",
endFile: "inverse-end.frag"
}
})
......@@ -3,26 +3,6 @@
name: "almond",
out: "../dist/converse-no-dependencies.min.js",
include: ["converse"],
excludeShallow: [
"locales",
"text!af",
"text!de",
"text!en",
"text!es",
"text!fr",
"text!he",
"text!hu",
"text!id",
"text!it",
"text!ja",
"text!nb",
"text!nl",
"text!pl",
"text!pt_BR",
"text!ru",
"text!uk",
"text!zh"
],
exclude: [
"awesomplete",
"jquery",
......@@ -42,12 +22,14 @@
],
paths: {
"converse-bookmarks": "builds/converse-bookmarks",
"converse-chatboxes": "builds/converse-chatboxes",
"converse-chatview": "builds/converse-chatview",
"converse-controlbox": "builds/converse-controlbox",
"converse-core": "builds/converse-core",
"converse-disco": "builds/converse-disco",
"converse-dragresize": "builds/converse-dragresize",
"converse-headline": "builds/converse-headline",
"converse-inverse": "builds/converse-inverse",
"converse-fullscreen": "builds/converse-fullscreen",
"converse-mam": "builds/converse-mam",
"converse-minimize": "builds/converse-minimize",
"converse-muc": "builds/converse-muc",
......@@ -60,7 +42,9 @@
"converse-rosterview": "builds/converse-rosterview",
"converse-singleton": "builds/converse-singleton",
"converse-vcard": "builds/converse-vcard",
"utils": "builds/utils"
"i18n": "builds/i18n",
"utils": "builds/utils",
"form-utils": "builds/form-utils"
},
wrap: {
startFile: "start.frag",
......
......@@ -11,7 +11,7 @@
"converse-disco": "builds/converse-disco",
"converse-dragresize": "builds/converse-dragresize",
"converse-headline": "builds/converse-headline",
"converse-inverse": "builds/converse-inverse",
"converse-fullscreen": "builds/converse-fullscreen",
"converse-mam": "builds/converse-mam",
"converse-minimize": "builds/converse-minimize",
"converse-muc": "builds/converse-muc",
......@@ -24,6 +24,7 @@
"converse-rosterview": "builds/converse-rosterview",
"converse-singleton": "builds/converse-singleton",
"converse-vcard": "builds/converse-vcard",
"i18n": "builds/i18n",
"utils": "builds/utils",
"form-utils": "builds/form-utils"
},
......
......@@ -3,10 +3,6 @@ if (typeof define !== 'undefined') {
// The section below determines which plugins will be included in a build
define([
"converse-core",
// PLEASE NOTE: By default all translations are included.
// You can modify the file src/locales.js to include only those
// translations that you care about.
/* START: Removable components
* --------------------
* Any of the following components may be removed if they're not needed.
......
/*global define */
if (typeof define !== 'undefined') {
// The section below determines which plugins will be included in a build
define([
"converse-core",
// PLEASE NOTE: By default all translations are included.
// You can modify the file src/locales.js to include only those
// translations that you care about.
/* START: Removable components
* --------------------
* Any of the following components may be removed if they're not needed.
*/
"converse-bookmarks", // XEP-0048 Bookmarks
"converse-chatview", // Renders standalone chat boxes for single user chat
"converse-controlbox", // The control box
"converse-headline", // Support for headline messages
"converse-mam", // XEP-0313 Message Archive Management
"converse-muc", // XEP-0045 Multi-user chat
"converse-notification",// HTML5 Notifications
"converse-otr", // Off-the-record encryption for one-on-one messages
"converse-ping", // XEP-0199 XMPP Ping
"converse-register", // XEP-0077 In-band registration
"converse-singleton", // Allow at most a single chat to be visible at any one time
"converse-vcard", // XEP-0054 VCard-temp
/* END: Removable components */
], function (converse) {
return converse;
});
}
......@@ -3,10 +3,6 @@ if (typeof define !== 'undefined') {
// The section below determines which plugins will be included in a build
define([
"converse-core",
// PLEASE NOTE: By default all translations are included.
// You can modify the file src/locales.js to include only those
// translations that you care about.
/* START: Removable components
* --------------------
* Any of the following components may be removed if they're not needed.
......
......@@ -32,6 +32,5 @@
define('backbone.browserStorage', ['backbone'], emptyFunction);
define('backbone.overview', ['backbone'], emptyFunction);
define('otr', [], function () { return { 'DSA': DSA, 'OTR': OTR };});
define("locales", [], emptyFunction);
return require('converse');
}));
......@@ -6,7 +6,7 @@
// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global define, escape, locales, Jed */
/*global define, escape, Jed */
(function (root, factory) {
define([
"sizzle",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment