Skip to content

Commit

Permalink
[removed] Individual files in bower release
Browse files Browse the repository at this point in the history
Resolves #693
  • Loading branch information
mtscout6 committed Jun 11, 2015
1 parent 3a254a1 commit 6e985b0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
3 changes: 1 addition & 2 deletions tools/amd/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"**/.*"
],
"dependencies": {
"react": ">= 0.13.0",
"classnames": "^2.0.0"
"react": ">= 0.13.0"
}
}
16 changes: 2 additions & 14 deletions tools/amd/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import path from 'path';
import fsp from 'fs-promise';
import { copy } from '../fs-utils';
import { exec } from '../exec';
import generateFactories from '../generateFactories';
import { repoRoot, srcRoot, bowerRoot } from '../constants';
import { buildFolder } from '../buildBabel';
import { repoRoot, bowerRoot } from '../constants';

const packagePath = path.join(repoRoot, 'package.json');
const bowerTemplate = path.join(__dirname, 'bower.json');
Expand All @@ -14,14 +12,6 @@ const bowerJson = path.join(bowerRoot, 'bower.json');
const readme = path.join(__dirname, 'README.md');
const license = path.join(repoRoot, 'LICENSE');

const babelOptions = {
__reactBootstrapDeprecationWarning: true,
modules: 'amd'
};

const libDestination = path.join(bowerRoot, 'lib');
const factoriesDestination = path.join(libDestination, 'factories');

function bowerConfig() {
return Promise.all([
fsp.readFile(packagePath)
Expand All @@ -37,11 +27,9 @@ export default function BuildBower() {
console.log('Building: '.cyan + 'bower module'.green);

return exec(`rimraf ${bowerRoot}`)
.then(() => fsp.mkdirs(factoriesDestination))
.then(() => fsp.mkdirs(bowerRoot))
.then(() => Promise.all([
bowerConfig(),
generateFactories(factoriesDestination, babelOptions),
buildFolder(srcRoot, libDestination, babelOptions),
copy(readme, bowerRoot),
copy(license, bowerRoot)
]))
Expand Down
8 changes: 1 addition & 7 deletions tools/buildBabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ export function buildContent(content, filename, destination, babelOptions={}) {
}

export function buildFile(filename, destination, babelOptions={}) {
let content = fs.readFileSync(filename, {encoding: 'utf8'});
if (babelOptions.__reactBootstrapDeprecationWarning) {
content = `console.warn('This file is deprecated, and will be removed in v0.24.0. Use react-bootstrap.js or react-bootstrap.min.js instead.');
console.warn('You can read more about it at https://github.com/react-bootstrap/react-bootstrap/issues/693');
${content}`;
}

const content = fs.readFileSync(filename, {encoding: 'utf8'});
if(babelUtil.canCompile(filename)) {
// Get file basename without the extension (in case not .js)
let outputName = path.basename(filename, path.extname(filename));
Expand Down

0 comments on commit 6e985b0

Please sign in to comment.