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

Update packaging, upgrade to TypeScript 1.8 #33

Merged
merged 7 commits into from Apr 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -19,6 +19,6 @@ install:
- "travis_retry npm install"
script:
- "grunt"
- "grunt intern:remote --combined"
- "grunt intern:saucelabs --combined"
- "grunt remapIstanbul:ci"
- "grunt uploadCoverage"
53 changes: 49 additions & 4 deletions Gruntfile.js
Expand Up @@ -14,6 +14,8 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-release');
grunt.loadNpmTasks('grunt-text-replace');
grunt.loadNpmTasks('grunt-ts');
grunt.loadNpmTasks('grunt-tslint');
grunt.loadNpmTasks('dts-generator');
Expand All @@ -38,15 +40,16 @@ module.exports = function (grunt) {
return glob;
});
var packageJson = grunt.file.readJSON('package.json');
var staticTestFiles = [ 'tests/**', '!tests/**/*.js*' ];

grunt.initConfig({
name: packageJson.name,
version: packageJson.version,
tsconfig: tsconfig,
tsconfigContent: tsconfigContent,
packageJson: packageJson,
all: [ '<%= tsconfig.filesGlob %>' ],
skipTests: [ '<%= all %>' , '!tests/**/*.ts' ],
staticTestFiles: [ 'tests/**/*.{html,css,json,xml}' ],
devDirectory: '<%= tsconfig.compilerOptions.outDir %>',
istanbulIgnoreNext: '/* istanbul ignore next */',

Expand Down Expand Up @@ -87,7 +90,7 @@ module.exports = function (grunt) {
staticTestFiles: {
expand: true,
cwd: '.',
src: [ '<%= staticTestFiles %>' ],
src: staticTestFiles,
dest: '<%= devDirectory %>'
},
typings: {
Expand Down Expand Up @@ -117,6 +120,12 @@ module.exports = function (grunt) {
config: '<%= devDirectory %>/tests/intern',
reporters: [ 'Runner' ]
},
browserstack: {},
saucelabs: {
options: {
config: '<%= devDirectory %>/tests/intern-saucelabs'
}
},
remote: {},
local: {
options: {
Expand All @@ -135,6 +144,21 @@ module.exports = function (grunt) {
}
},

release: {
options: {
// Update the bower.json version as well
additionalFiles: [ 'bower.json' ],
// Run tasks after the version has been updated in package.json and bower.json
afterBump: [ 'clean', 'dist' ],
// Publish the "dist/" directory to npm
folder: 'dist/',
commitMessage: 'Updating source version to <%= version %>',
tagMessage: 'Release <%= version %>',
// Update the `version` property on the `packageJson` object.
updateVars: [ packageJson ]
}
},

rename: {
sourceMaps: {
expand: true,
Expand All @@ -150,6 +174,23 @@ module.exports = function (grunt) {
}
},

replace: {
addIstanbulIgnore: {
src: [ '<%= devDirectory %>/**/*.js' ],
overwrite: true,
replacements: [
{
from: /^(var __(?:extends|decorate) = )/gm,
to: '$1<%= istanbulIgnoreNext %> '
},
{
from: /^(\()(function \(deps, )/m,
to: '$1<%= istanbulIgnoreNext %> $2'
}
]
}
},

ts: {
options: tsOptions,
dev: {
Expand All @@ -158,6 +199,8 @@ module.exports = function (grunt) {
},
dist: {
options: {
mapRoot: '../dist/_debug',
sourceMap: true,
inlineSourceMap: false,
inlineSources: true
},
Expand Down Expand Up @@ -190,7 +233,7 @@ module.exports = function (grunt) {
options: {
atBegin: true
},
files: [ '<%= all %>', '<%= staticTestFiles %>' ],
files: [ '<%= all %>' ].concat(staticTestFiles),
tasks: [
'dev'
]
Expand Down Expand Up @@ -261,6 +304,7 @@ module.exports = function (grunt) {
'tslint',
'ts:dev',
'copy:staticTestFiles',
'replace:addIstanbulIgnore',
'updateTsconfig'
]);
grunt.registerTask('dist', [
Expand All @@ -270,7 +314,8 @@ module.exports = function (grunt) {
'rewriteSourceMaps',
'copy:typings',
'copy:staticFiles',
'dtsGenerator:dist'
'dtsGenerator:dist',
'updatePackageJson'
]);
grunt.registerTask('test-proxy', [ 'dev', 'intern:proxy' ]);
grunt.registerTask('default', [ 'clean', 'dev' ]);
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -2,9 +2,9 @@

[![Build Status](https://travis-ci.org/dojo/dom.svg?branch=master)](https://travis-ci.org/dojo/dom)
[![codecov.io](http://codecov.io/github/dojo/dom/coverage.svg?branch=master)](http://codecov.io/github/dojo/dom?branch=master)
[![npm version](https://badge.fury.io/js/dojo-dom.svg)](http://badge.fury.io/js/dojo-dom)


The dom package provides utilities for DOM manipulation and event handling/delegation in browser runtimes.
The `dojo-dom` package provides utilities for DOM manipulation and event handling/delegation in browser runtimes.
It encourages (and shims) standard DOM methods where possible, but also provides utilities to make
common and recommended use cases easy and obvious, and harder use cases less painful.

Expand Down