Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move package templating compiler es6 #389

Merged
merged 3 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/templating-compiler/compile-templates.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/* global CachingHtmlCompiler TemplatingTools */
Plugin.registerCompiler({
extensions: ['html'],
archMatching: 'web',
isTemplate: true
isTemplate: true,
}, () => new CachingHtmlCompiler(
"templating",
'templating',
TemplatingTools.scanHtmlForTags,
TemplatingTools.compileTagsWithSpacebars
));
13 changes: 7 additions & 6 deletions packages/templating-compiler/package.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
/* eslint-env meteor */
Package.describe({
name: 'templating-compiler',
summary: "Compile templates in .html files",
summary: 'Compile templates in .html files',
version: '1.4.1',
git: 'https://github.com/meteor/blaze.git',
documentation: null
documentation: null,
});

Package.registerBuildPlugin({
name: "compileTemplatesBatch",
name: 'compileTemplatesBatch',
use: [
'ecmascript@0.15.1',
'caching-html-compiler@1.2.0',
'templating-tools@1.2.0'
'templating-tools@1.2.0',
],
sources: [
'compile-templates.js'
]
'compile-templates.js',
],
});

Package.onUse(function (api) {
Expand Down
33 changes: 33 additions & 0 deletions site/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,39 @@ Blaze is a Meteor-only package for now. Soon we will have Blaze on npm so you ca

Each new Meteor project you create has Blaze included (the `blaze-html-templates` package).

## Prerequisite

Earlier, `jQuery` was bundled with Blaze. In later versions Blaze does not have `jQuery` as a direct dependency. With some legacy Blaze packages you might encounter the following error.

```js
Uncaught Error: jQuery not found
```

To mitigate this error it is advised to install `jQuery` either as an `npm` or as a `atmospherejs` package.


#### install jquery with npm

Into project root.
```sh
meteor npm install jquery@latest --save
```
Import `jQuery` in `client/main.js`.
```js
import $ from 'jquery';
```

#### install jquery with atmospherejs

Into project root.
```sh
meteor add jquery@3.0.0
```
Import `jQuery` in `client/main.js`.
```js
import {$} from 'meteor/jquery';
```

## Details

Blaze has two major parts:
Expand Down