File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
app/src/app/store/modules/editor
common/templates/configuration/package-json Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 11import { fromPairs , toPairs , sortBy } from 'lodash' ;
2+ import slugify from 'common/utils/slugify' ;
23import { clone } from 'mobx-state-tree' ;
34
45function sortObjectByKeys ( object ) {
@@ -45,7 +46,7 @@ export function updateSandboxPackage({ state }) {
4546 const sandbox = state . get ( 'editor.currentSandbox' ) ;
4647
4748 parsed . keywords = sandbox . tags ;
48- parsed . name = sandbox . title || sandbox . id ;
49+ parsed . name = slugify ( sandbox . title || sandbox . id ) ;
4950 parsed . description = sandbox . description ;
5051
5152 return {
Original file line number Diff line number Diff line change 11// @flow
22
33import type { Sandbox } from 'common/types' ;
4+ import slugify from 'common/utils/slugify' ;
45import type { ConfigurationFile } from '../types' ;
56
67export function generateFileFromSandbox ( sandbox : Sandbox ) {
78 const jsonFile = { } ;
89
9- jsonFile . name = sandbox . title || sandbox . id ;
10+ jsonFile . name = slugify ( sandbox . title || sandbox . id ) ;
1011 jsonFile . version = '1.0.0' ;
1112 jsonFile . description = sandbox . description || '' ;
1213 jsonFile . keywords = sandbox . tags ;
You can’t perform that action at this time.
0 commit comments