diff --git a/lib/cli/generators/RIOT/index.js b/lib/cli/generators/RIOT/index.js
index 3390dcef8244..86eedf5500bd 100644
--- a/lib/cli/generators/RIOT/index.js
+++ b/lib/cli/generators/RIOT/index.js
@@ -3,12 +3,19 @@ import path from 'path';
import { getVersions, getPackageJson, writePackageJson, installBabel } from '../../lib/helpers';
export default async npmOptions => {
- const [storybookVersion, actionsVersion, linksVersion, addonsVersion] = await getVersions(
+ const [
+ storybookVersion,
+ actionsVersion,
+ linksVersion,
+ addonsVersion,
+ tagLoaderVersion,
+ ] = await getVersions(
npmOptions,
'@storybook/riot',
'@storybook/addon-actions',
'@storybook/addon-links',
- '@storybook/addons'
+ '@storybook/addons',
+ 'riot-tag-loader'
);
mergeDirs(path.resolve(__dirname, 'template'), '.', 'overwrite');
@@ -21,6 +28,11 @@ export default async npmOptions => {
packageJson.devDependencies['@storybook/addon-actions'] = actionsVersion;
packageJson.devDependencies['@storybook/addon-links'] = linksVersion;
packageJson.devDependencies['@storybook/addons'] = addonsVersion;
+ if (
+ !packageJson.devDependencies['riot-tag-loader'] &&
+ !packageJson.dependencies['riot-tag-loader']
+ )
+ packageJson.devDependencies['riot-tag-loader'] = tagLoaderVersion;
await installBabel(npmOptions, packageJson);
diff --git a/lib/cli/generators/RIOT/template/stories/MyButton.tag b/lib/cli/generators/RIOT/template/stories/MyButton.tag
index 642c2d464dd3..c2ce1c5892ce 100644
--- a/lib/cli/generators/RIOT/template/stories/MyButton.tag
+++ b/lib/cli/generators/RIOT/template/stories/MyButton.tag
@@ -1,17 +1,17 @@
-
+
@@ -21,4 +21,4 @@
(() => { console.log('clicked') })).bind(this, e)
}
-
+
diff --git a/lib/cli/test/fixtures/riot/package.json b/lib/cli/test/fixtures/riot/package.json
index c4a3641c1cce..219ddac305ad 100644
--- a/lib/cli/test/fixtures/riot/package.json
+++ b/lib/cli/test/fixtures/riot/package.json
@@ -25,7 +25,6 @@
"riot": "latest",
"webpack": "latest",
"webpack-cli": "latest",
- "riot-tag-loader": "latest",
"uglifyjs-webpack-plugin": "latest",
"webpack-bundle-analyzer": "latest",
"packer-webpack-plugin": "latest",
diff --git a/lib/cli/test/snapshots/riot/package.json b/lib/cli/test/snapshots/riot/package.json
index bcfc8d8e679f..812fe3b717d6 100644
--- a/lib/cli/test/snapshots/riot/package.json
+++ b/lib/cli/test/snapshots/riot/package.json
@@ -27,7 +27,6 @@
"riot": "latest",
"webpack": "latest",
"webpack-cli": "latest",
- "riot-tag-loader": "latest",
"uglifyjs-webpack-plugin": "latest",
"webpack-bundle-analyzer": "latest",
"packer-webpack-plugin": "latest",
@@ -38,6 +37,7 @@
"@storybook/addon-actions": "^4.0.0-alpha.20",
"@storybook/addon-links": "^4.0.0-alpha.20",
"@storybook/addons": "^4.0.0-alpha.20",
+ "riot-tag-loader": "^2.1.0",
"@babel/core": "^7.0.0"
},
"peerDependencies": {
diff --git a/lib/cli/test/snapshots/riot/stories/MyButton.tag b/lib/cli/test/snapshots/riot/stories/MyButton.tag
index 642c2d464dd3..c2ce1c5892ce 100644
--- a/lib/cli/test/snapshots/riot/stories/MyButton.tag
+++ b/lib/cli/test/snapshots/riot/stories/MyButton.tag
@@ -1,17 +1,17 @@
-
+
@@ -21,4 +21,4 @@
(() => { console.log('clicked') })).bind(this, e)
}
-
+