From a58eab59ee6eb1a16c5e879f09c00379e5d59760 Mon Sep 17 00:00:00 2001 From: AlexKVal Date: Tue, 14 Apr 2015 18:53:25 +0300 Subject: [PATCH] [fixed] Fix 'import from' => 'import' Babel is more strict now as for `import` syntax. According to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import Import an entire module for side effects only, without importing any bindings. import "my-module.js"; --- docs/client.js | 10 +++++----- docs/src/CodeMirror.client.js | 9 ++++----- ie8/src.js | 2 +- test/index.js | 2 +- tools/build.js | 2 +- tools/lib/build.js | 2 +- tools/release-scripts/changelog.js | 2 +- tools/release-scripts/pre-conditions.js | 2 +- tools/release-scripts/repo-release.js | 2 +- tools/release-scripts/test.js | 2 +- tools/release-scripts/version-bump.js | 2 +- 11 files changed, 18 insertions(+), 19 deletions(-) diff --git a/docs/client.js b/docs/client.js index 2ffda6e943..e3680ee13d 100644 --- a/docs/client.js +++ b/docs/client.js @@ -1,9 +1,9 @@ -import from 'bootstrap/less/bootstrap.less'; -import from './assets/docs.css'; -import from './assets/style.css'; +import 'bootstrap/less/bootstrap.less'; +import './assets/docs.css'; +import './assets/style.css'; -import from './assets/carousel.png'; -import from './assets/logo.png'; +import './assets/carousel.png'; +import './assets/logo.png'; import React from 'react'; import Router from 'react-router'; diff --git a/docs/src/CodeMirror.client.js b/docs/src/CodeMirror.client.js index 04af815082..ee811bb38c 100644 --- a/docs/src/CodeMirror.client.js +++ b/docs/src/CodeMirror.client.js @@ -1,10 +1,9 @@ import CodeMirror from 'codemirror'; -import from 'codemirror/mode/javascript/javascript'; +import 'codemirror/mode/javascript/javascript'; -import from 'codemirror/theme/solarized.css'; -import from 'codemirror/lib/codemirror.css'; -//import from '../vendor/codemirror/syntax.css'; -import from './CodeMirror.css'; +import 'codemirror/theme/solarized.css'; +import 'codemirror/lib/codemirror.css'; +import './CodeMirror.css'; export default { IS_NODE: false, diff --git a/ie8/src.js b/ie8/src.js index 75836e1e12..e8edfd5f13 100644 --- a/ie8/src.js +++ b/ie8/src.js @@ -16,7 +16,7 @@ import Popover from '../src/Popover'; import Carousel from '../src/Carousel'; import CarouselItem from '../src/CarouselItem'; -import from './assets/carousel.png'; +import './assets/carousel.png'; const dropdownInstance = ( diff --git a/test/index.js b/test/index.js index 399534d547..221efcee06 100644 --- a/test/index.js +++ b/test/index.js @@ -1,3 +1,3 @@ -import from 'es5-shim'; +import 'es5-shim'; const testsContext = require.context('.', true, /Spec$/); testsContext.keys().forEach(testsContext); diff --git a/tools/build.js b/tools/build.js index 13051de53b..8a66546ddc 100644 --- a/tools/build.js +++ b/tools/build.js @@ -1,6 +1,6 @@ /* eslint no-process-exit: 0 */ -import from 'colors'; +import 'colors'; import path from 'path'; import bower from './amd/build'; import lib from './lib/build'; diff --git a/tools/lib/build.js b/tools/lib/build.js index 3281a33be1..3451f8e105 100644 --- a/tools/lib/build.js +++ b/tools/lib/build.js @@ -1,4 +1,4 @@ -import from 'colors'; +import 'colors'; import path from 'path'; import { exec } from 'child-process-promise'; diff --git a/tools/release-scripts/changelog.js b/tools/release-scripts/changelog.js index 5d4af17e9f..d1bac60d8b 100644 --- a/tools/release-scripts/changelog.js +++ b/tools/release-scripts/changelog.js @@ -1,4 +1,4 @@ -import from 'colors'; +import 'colors'; import path from 'path'; import { exec } from 'child-process-promise'; diff --git a/tools/release-scripts/pre-conditions.js b/tools/release-scripts/pre-conditions.js index 4129d8b92e..67a2410ac5 100644 --- a/tools/release-scripts/pre-conditions.js +++ b/tools/release-scripts/pre-conditions.js @@ -1,4 +1,4 @@ -import from 'colors'; +import 'colors'; import { exec } from 'child-process-promise'; function ensureClean() { diff --git a/tools/release-scripts/repo-release.js b/tools/release-scripts/repo-release.js index 5f5b635c6a..d8347bd6ec 100644 --- a/tools/release-scripts/repo-release.js +++ b/tools/release-scripts/repo-release.js @@ -1,4 +1,4 @@ -import from 'colors'; +import 'colors'; import path from 'path'; import fsp from 'fs-promise'; import { exec } from 'child-process-promise'; diff --git a/tools/release-scripts/test.js b/tools/release-scripts/test.js index f3ff17c37a..393d58a025 100644 --- a/tools/release-scripts/test.js +++ b/tools/release-scripts/test.js @@ -1,4 +1,4 @@ -import from 'colors'; +import 'colors'; import { exec } from 'child-process-promise'; function test() { diff --git a/tools/release-scripts/version-bump.js b/tools/release-scripts/version-bump.js index 1afd44e81f..c3dffd594e 100644 --- a/tools/release-scripts/version-bump.js +++ b/tools/release-scripts/version-bump.js @@ -1,4 +1,4 @@ -import from 'colors'; +import 'colors'; import path from 'path'; import fsp from 'fs-promise'; import semver from 'semver';