Skip to content

Commit

Permalink
Custom template (codesandbox#854)
Browse files Browse the repository at this point in the history
* Custom template

* Bump

* Reset compilation when config of modules change

* Fix null sandpackconfig

* Remove double setup

* Bump

* Make optimization of cache optional

* Bump

* Don't save cache on smoosh

* BUMP

* Add module mockgp

* Version bump

* Fix package json version resolving

* Bump

* mock modulke

* Fix module

* Bump to 0.0.45

* Fix typing problem

* Fix new build step

* Version bump

* Remove console.log

* Bump version

* Async file resolving

* Remote messaging system

* Add remote file resolving

* Bump version

* Remove comments

* Allow dynamic import in ESModule dependencies

* Also add dynamic syntax to parser opts

* Fix custom template resetting for new manager

* Bump

* Bump

* Upgrade codesandbox-api

* Fix typings

* Fix getCodeSandboxURL

* Bump version

* Fix merge conflict

* Add babel transpiler

* New version bump

* Update locks

* Publish new codesandbox-api

* Bump sandpack

* Update codesandbox-api

* Add button for disabling button

* Add option to manager

* Bump

* Rename vscode-editor

* Disable shadows altogether in SSE loading screen
  • Loading branch information
CompuIves authored and SaraVieira committed Nov 24, 2018
1 parent c31ebb6 commit cd09238
Show file tree
Hide file tree
Showing 3 changed files with 3,311 additions and 41 deletions.
5 changes: 4 additions & 1 deletion packages/app/src/app/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import { mainModule, defaultOpenedModule } from './utils/main-module';
export function getSandbox({ props, api, path }) {
return api
.get(`/sandboxes/${props.id}`)
.then(data => path.success({ sandbox: data }))
.then(data => {
// data.template = 'custom';
return path.success({ sandbox: data });
})
.catch(error => {
if (error.response.status === 404) {
return path.notFound();
Expand Down
9 changes: 9 additions & 0 deletions packages/app/src/sandbox/eval/transpiled-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,18 @@ export default class TranspiledModule {
isAbsolute: boolean,
isEntry: boolean,
},
<<<<<<< HEAD
isTranspilationDep: boolean = false
) {
if (depPath.startsWith('codesandbox-api')) {
=======
isTranspilationDep = false
) {
if (
depPath.startsWith('babel-runtime') ||
depPath.startsWith('codesandbox-api')
) {
>>>>>>> Custom template (#854)
return;
}

Expand Down
Loading

0 comments on commit cd09238

Please sign in to comment.