Helper tool to build Bobril applications
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.vscode Fixed "kind" crash Dec 19, 2016
assets/notify-icons Remove ascii logo. If you still want it write plugin. Jun 16, 2016
bin Big directory layout refactoring Apr 27, 2016
dist Fixed test crashes. Mar 20, 2018
distweb Replaced chrome runner. Nov 24, 2017
distwebt Improve speed of console.log in tests by caching source maps Feb 16, 2017
examples Bobril-build evolved to Bobril-build core Sep 9, 2018
spec Typescript updated to 2.6. Nov 24, 2017
src Fixed test crashes. Mar 20, 2018
srcHelpers PhantomJs runner replaced by Chrome Headless runner Aug 2, 2017
typings/jasmine Update of jasmine.d.ts Feb 23, 2018
web
webt Improve speed of console.log in tests by caching source maps Feb 16, 2017
.gitattributes bobril-build binary fix on mac (#39) Jan 12, 2017
.gitignore tsconfig.json files are generated by bb => add to git ignore. Jan 9, 2016
.npmignore Big directory layout refactoring Apr 27, 2016
CHANGELOG.md Fixed test crashes. Mar 20, 2018
README.md Bobril-build evolved to Bobril-build core Sep 9, 2018
cSpell.json Better console.logs and fixed some spelling. Feb 25, 2017
package.json Fixed test crashes. Mar 20, 2018
yarn.lock Fixed test crashes. Mar 20, 2018

README.md

bobril-build

Helper tool to build Bobril applications Mainly it will support copying sprites, building big sprites. support i18n. All this during optimal TypeScript compilation.

This bobril-build implementation was relaced by bobril-build-core in C# for faster bundling.

All future development is happening here: https://github.com/bobril/bbcore

How to use:

npm install bobril-build -g

Then create package.json with typescript.main or name your main ts file as index.ts or app.ts and start:

bb

This will start bobril build in interactive mode. It will watch changes of your application, recompile and host in on http://localhost:8080. It uses latest Typescript to compile and prefer Node moduleResolution. Compilation for maximum speed enables skipDefaultLibCheck.

In interactive mode it also starts chrome headless and runs tests. Results could be seen on http://localhost:8080/bb. To start another testing agent point any browser to http://localhost:8080/bb/test. If you want to debug tests open http://localhost:8080/test.html, any failed asserts throws expections so it is easy to stop on them.

There is also command line single build option. Start to learn all options:

bb -h

Use bobril.asset(path) to include asset to compilation. _.css files are automatically linked in index.html head. _.js files are automatically prepended to bundle.js.

Jenkins integration (in memory compile, run tests in Chrome Headless, write result in JUnit xml format):

bb test -o junitTestResult.xml

It reads package.json and understands:

{
    "typescript": {
        "main": "pathToMain.ts"
    },
    "bobril": {
        "dir": "name of directory where to place release default is dist",
        "resourcesAreRelativeToProjectDir": false, // this is default
        "example": "pathToExample.ts", // sample application entry point - if main is index.ts than example.ts is searched for default
        "title": "index.html Title",
        "interactiveToDisk": false, // write output of interactive mode do "dir" directory
        "compilerOptions": {
            "noImplicitAny": true,
            "noImplicitThis": true,
            "noUnusedLocals": true,
            "noUnusedParameters": true,
            "noImplicitReturns": true,
            "noFallthroughCasesInSwitch": true,
            "strictNullChecks": true,
            "declaration": true,
        },
        "prefixStyleDefs": undefined,
        "constantOverrides": {
            "module_name": {
                "export_name": "New value, it supports also number and boolean values"
            }
        },
        "dependencies": "install", // "disable" = no yarn at start, "install" = yarn install, "upgrade" = yarn upgrade
        "plugins": {
            "pluginName": {
                "configKey": "configValue"
            }
        },
        "defaultLanguage": "en-US" // default translation language
    }
}

Obsolete info

Changelog: https://github.com/Bobris/Bobril-build/blob/master/CHANGELOG.md

Requires: Node version 8+ (needs to support async)

For development of bobril-build check out this project and start:

npm link

Compile using tasks in VSCode or running tsc (in directories src, srcHelpers, spec). Web and Webt dirs are compiled by itself bb b.