Comments (7)
Not that I'm volunteering, but there are a lot of export options for ES6
modules, would you expect:
- an simple object containing the file's templates:
export default {
someTemplate1(...) {
...
}
someTemplate2(...) {
...
}
};
- a export per-template
export function someTemplate1(...) {
....
};
- something else?
On Sun, Feb 22, 2015 at 9:15 PM, hitsthings [email protected]
wrote:
Soy currently compiles to JS globals, which is still a good "least common
denominator" choice. Forward-looking projects are already using ES6 modules
and transpiling it back to whatever format they like (AMD, CommonJS,
globals, whatever). An option to compile to ES6 modules is a good current
choice, and in the future will be a better default choice.—
Reply to this email directly or view it on GitHub
#30.
from closure-templates.
@hitsthings @concavelenz What's the use case? There are clear benefits to writing source code in ES6, as you mention, but it's less clear what the benefits of compiling to ES6 are, other than "all parts of our pipeline should use the latest syntax".
It should eventually happen, but it might not be the highest priority.
from closure-templates.
Native dependency management.
On Mar 28, 2015 5:50 AM, "Brendan Linn" [email protected] wrote:
@hitsthings https://github.com/hitsthings @concavelenz
https://github.com/concavelenz What's the use case? There are clear
benefits to writing source code in ES6, as you mention, but it's less
clear what the benefits of compiling to ES6 are, other than "all parts
of our pipeline should use the latest syntax".It should eventually happen, but it might not be the highest priority.
—
Reply to this email directly or view it on GitHub
#30 (comment)
.
from closure-templates.
What's the use case?
Native dep management is one - not having to use goog.require would be good. If the rest of my code is using the AMDish loader of BabelJS, and Soy is using goog.provides, I and every other consumer has to do work to make them play together.
I have a project written in ES6 syntax with a build pipeline that expects ES6 as the source language. My build is either more complicated if I use Soy since I have to exclude it from parts of the build.
It should eventually happen, but it might not be the highest priority.
Fair enough. I wasn't advocating for making it the default, just making it a possibility.
from closure-templates.
I'm interested in implementing this or #65, but want to know what direction the library maintainers want to take this? Some in-principle support for one approach or the other would be good. At the moment I'm leaning towards AMD.
from closure-templates.
bump?
from closure-templates.
FYI, I recently added a modularize option to atlassian-soy-loader. So if you compile with webpack, you can give that package a try. It assumes the Soy namespace in camelCase maps to a module name in kebab-case (but you can override this)
It's a little specific to Atlassian though, as it expects SoyFunctions to be implemented with the Atlassian facade. The code can at least be inspiration though.
from closure-templates.
Related Issues (20)
- Internal Soy Error when compiling Soy headers HOT 2
- comments in parameter lists HOT 2
- Missing documentation / example how to use protobufs in Soy HOT 5
- Google UI HOT 1
- Latest release (release-2022-10-26) has several security issues
- Invalid multimap flag entry. No '=' found: io.noticeable.newspage.soy.functions.ContainsFunction HOT 1
- Dependencies addition of soyutils_usegoog.js makes hard to compile soy files HOT 5
- src/js/soyutils/soyutils_usegoog.js:46:264 ERROR - [JSC_MISSING_MODULE_OR_PROVIDE] Required namespace "safevalues" never defined. HOT 2
- Missing module HOT 4
- src/js/soyutils/soyutils_usegoog.js:46:264 ERROR - [JSC_MISSING_MODULE_OR_PROVIDE] Required namespace "safevalues" never defined. HOT 2
- malware HOT 1
- https://github.com/google/closure-templates/issues/1947#issue-2170271938 HOT 2
- Request to publish older versions to npm
- There is a vulnerability in google-gson 2.7,upgrade recommended HOT 1
- SoyToJsSrcCompiler.jar is out of date HOT 1
- Remove `--deps` from CLI usage message
- What kind of path can be specified in import statements?
- Invalid 'for' command text
- variable soy is undeclared HOT 1
- Ts** are not declared HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from closure-templates.