Coder Social home page Coder Social logo

soundworks-template's Introduction

soundworks-template

Project template for developing soundworks applications.

For a complete documentation of soundworks, please refer to http://collective-soundworks.github.io

Creating a new application

git clone https://github.com/collective-soundworks/soundworks-template.git my-application
cd my-application
rm -Rf .git
npm install
npm run dev

Internal tools

@soundworks/template-build

The @soundworks/template-build package contains all the build scripts for the soundworks-template

@soundworks/template-helpers

The @soundworks/template-helpers package contains common helpers (views, etc.) shared by most the applications.

Browser support

In version 3.1.0: the soundworks-template aims at supporting all major evergreen browsers and iOS Safari >= 9.3.5

License

BSD-3-Clause

soundworks-template's People

Contributors

b-ma avatar i-robi avatar jipodine avatar pyrapple avatar schlenger avatar tschnz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

soundworks-template's Issues

node-sass dependency needs a tweak

Hi guys,

the node-sass package has made some breaking changes after 3.4.1 which causes the following error when building (I was building [soundfield]):

[soundfield] sass_02-commons.scss (180:3): sass error

Base-level rules cannot contain the parent-selector-referencing character '&'.

I recommend changing in package.json
"node-sass": "^3.4.1",
to
"node-sass": "3.4.1",
... until you have adjusted sass_02-commons.scss to build with the latest (3.7.0) node-sass.

Cheers !

Michael

If switching the environment to "production", the application is not loaded

Since I can't find any information about changing the logging level within the production environment, I can't debug the whole process.

It seems like something is going wrong if the environment is switched (resources are generated and minified already).

This is reproducible with the current checked in template project in a clean state.

I'm happy about any feedback regarding this issue.

review default styling

  • add sass by default
  • review default soundworks-template-helpers views to use flex
  • use layout from como.education

Error with dependency when running `npm run start`

$ npm run start

> [email protected] start /Users/lucas/summer-2019/soundworks-template-1
> node bin/runner --start


/Users/lucas/summer-2019/soundworks-template-1/node_modules/soundworks/node_modules/uws/uws.js:44
})();
  ^
Error: Compilation of µWebSockets has failed and there is no pre-compiled binary available for your system. Please install a supported C++11 compiler and reinstall the module 'uws'.
    at /Users/lucas/summer-2019/soundworks-template-1/node_modules/soundworks/node_modules/uws/uws.js:40:19
    at Object.<anonymous> (/Users/lucas/summer-2019/soundworks-template-1/node_modules/soundworks/node_modules/uws/uws.js:44:3)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/Users/lucas/summer-2019/soundworks-template-1/node_modules/soundworks/server/services/RawSocket.js:4:1)
    at Module._compile (internal/modules/cjs/loader.js:816:30)

I've tried removing node_modules and reinstalling but that didn't help

Best practice to share code between the server and the client (with external includes)

This is more a question than an issue, but current approach is quite unclear to me.

What I want to do: I want to share code, that is used in the server as well as in the client code, e.g. typescript classes or something like you did with the schemas in this project. Another example would be e.g. a shared Utils class.

The issue: While this is working in a basic version, when I e.g. put the types/utils function on the server side, there seems to be an issue, when I use external libs, let's say the lit-html import as import { html, Template } from "lit-html"; I get the following errors on the client side and at runtime:

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: [...]\node_modules\lit-element\lit-element.js
require() of ES modules is not supported.
require() of [...]\node_modules\lit-element\lit-element.js from [...]\.build\server\types\uiModule.class.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename lit-element.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from [...]\node_modules\lit-element\package.json.

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1085:13)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> ([...]\.build\server\types\uiModule.class.ts:4:1)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)

Note: Maybe there is an easy fix to this. I just don't know where to start debugging/fixing this, since everything I searched for didn't provide any solution. There also seem to be some issues with some node versions in general: https://github.com/manuelbieh/authoring-modules-in-node I've upgrade the the latest stable release and the error still exists.

issues with installing and running

looking forward to experimenting with this!

after pulling this repository on my machine, i run an npm install (also sudo npm install -g), and a bunch of errors come back. then i go into src/server and try to run the index.es6.js file.

elliott:soundworks-template mrtunes$ sudo npm install
npm WARN package.json [email protected] No repository field.
npm WARN deprecated [email protected]: Deprecated. Check out [gulp-babel](https://github.com/babel/gulp-babel) instead.
npm ERR! Failed resolving git HEAD (https://github.com/collective-soundworks/soundworks.git) fatal: ambiguous argument 'v0.3.0': unknown revision or path not in the working tree.
npm ERR! Failed resolving git HEAD (https://github.com/collective-soundworks/soundworks.git) Use '--' to separate paths from revisions, like this:
npm ERR! Failed resolving git HEAD (https://github.com/collective-soundworks/soundworks.git) 'git <command> [<revision>...] -- [<file>...]'
npm ERR! Failed resolving git HEAD (https://github.com/collective-soundworks/soundworks.git) 
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.1
npm ERR! npm  v2.5.1
npm ERR! code 128

npm ERR! Command failed: git rev-list -n1 v0.3.0
npm ERR! fatal: ambiguous argument 'v0.3.0': unknown revision or path not in the working tree.
npm ERR! Use '--' to separate paths from revisions, like this:
npm ERR! 'git <command> [<revision>...] -- [<file>...]'
npm ERR! 
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/mrtunes/GitHub/soundworks-template/npm-debug.log

trying to run a server:

elliott:server mrtunes$ node index.es6.js
/Users/mrtunes/GitHub/soundworks-template/src/server/index.es6.js:17
class MyPerformance extends serverSide.Performance {
^^^^^
SyntaxError: Unexpected reserved word
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Add cross plattform support

Hey, Win10 64bit here. Tried to use npm install but cmd can't handle && and cp in the postinstall script.

In package.json I changed the following:

"repository": {
    ...
    "run-script-os": "^1.1.5",
    ...
  },

and

  "scripts": {
    ...
    "postinstall": "run-script-os",
    "postinstall:default": "mkdir -p .vendors/public && cp -R node_modules/@webcomponents/webcomponentsjs .vendors/public",
    "postinstall:win32": "Xcopy /E /I /H /Y node_modules\\@webcomponents\\webcomponentsjs .vendors\\public",
    ...
  },

So the default should be used for every OS but Windows. Couldn't test if npm install now still works on other systems.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.