npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

meteor-client-packages-meteor

v1.4.2-1.0.7

Published

Use Meteor's client Packages in a non Meteor project

Downloads

64

Readme

meteor-client-packages-meteor

YOU CAN CONTINUE TO USE THIS PACKAGE BUT YOU HAVE AN ALTERNATIVE THAT REFERENCE DIRECTLY ANY LOCAL METEOR SERVER : meteor-webpack-client.

Use Meteor's client packages side in a non Meteor project.

The packages given are :

  • Accounts password
  • Accounts UI
  • Blaze
  • DDP
  • Minimongo
  • Tracker

and all the individual depedencies.

Installation

NPM

npm install --save [email protected] for Meteor 1.3.5

npm install --save [email protected] for Meteor 1.3.5.1

npm install --save [email protected] for Meteor 1.4

npm install --save [email protected] for Meteor 1.4.0.1

npm install --save [email protected] for Meteor 1.4.1

npm install --save [email protected] for Meteor 1.4.1.1

npm install --save [email protected] for Meteor 1.4.1.2

npm install --save [email protected] for Meteor 1.4.1.3

npm install --save [email protected] for Meteor 1.4.2

npm install --save [email protected] for Meteor 1.4.2.1

Usage

1. Meteor setup :

To define __meteor_runtime_config__ global variables you can make a meteor-runtime-config.js file in your root. The following is the default if empty :

export const __meteor_runtime_config__ = {
  meteorEnv: {},
  DDP_DEFAULT_CONNECTION_URL: 'http://localhost:3000',
  PUBLIC_SETTINGS: {
    __global_scope__: false
  }
};
  • Set DDP connection url with DDP_DEFAULT_CONNECTION_URL
  • Make Meteor objects global with __global_scope__: true.

2. Load the meteor-client-packages-meteor packages :

To use with webpack you have to add the following code at the end of your webpack.config.js file :

config = generateConfig(
  config,
  require('meteor-client-packages/easy-webpack')()
);

[name] have to be in the filename of css files of shunks :

require('@easy-webpack/config-css')
  ({ filename: '[name].styles.css', allChunks: true, sourceMap: false }),

It makes it possible to import the packages as in Meteor 1.3+ :

import { Meteor } from 'meteor/meteor';
import { DDP } from 'meteor/ddp';

meteor-client-packages/easy-webpack has tow optional parameters :

  • absoluteNodeModulesPath: (default to false) node_modules must have absolute path (usefull with symlink). It has not been tested without Aurelia.
  • rootDir: (default to current root dir) the base dir for node_modules if absoluteNodeModulesPath is true

The packages bundled by webpack are only those imported by your code with their dependencies.

3. Versions

The version of this package takes the same version as the Meteor version for witch the Meteor packages have been compiled.

meteor-client-packages-meteor version : 1.3.5-0.x.x  <==  Meteor version : 1.3.5
meteor-client-packages-meteor version : 1.3.5-1.x.x  <==  Meteor version : 1.3.5.1
meteor-client-packages-meteor version : 1.4.0-0.x.x  <==  Meteor version : 1.4
meteor-client-packages-meteor version : 1.4.0-1.x.x  <==  Meteor version : 1.4.0.1
meteor-client-packages-meteor version : 1.4.1-0.x.x  <==  Meteor version : 1.4.1
meteor-client-packages-meteor version : 1.4.1-1.x.x  <==  Meteor version : 1.4.1.1
meteor-client-packages-meteor version : 1.4.1-2.x.x  <==  Meteor version : 1.4.1.2
meteor-client-packages-meteor version : 1.4.1-2.x.x  <==  Meteor version : 1.4.1.3
meteor-client-packages-meteor version : 1.4.2-0.x.x  <==  Meteor version : 1.4.2
meteor-client-packages-meteor version : 1.4.2-1.x.x  <==  Meteor version : 1.4.2.1

4. Your own NPM package for other METEOR packages

You have to use this NPM Package as a model. To change the packages to include you have to :

  1. Change the file __src__\packages witch has to include the Meteor packages name you need
  2. Change the file __src__\meteor-version to compile to the good version of Meteor when this makes sense
  3. Change the file __src__\meteor-packages-meteorVersion to define dependencies and package-version
  4. In dependencies of the package.json file, replace meteor-client-packages by meteor-client-packages-meteor
  5. Do npm run build or npm start
  6. Don't forget git add *, git commit -m "new version", git push and npm publish

Don't include a Meteor package already in this NPM package in the file __src__\meteor-packages-meteorVersion.json.

Your have to create your NPM package with a name like meteor-client-packages-....

All the meteor-client-packages-... NPM packages are loaded by webpack to define the aliases of the Meteor packages.

What I've done

The code is in the native compiled version of Meteor for a given version.

I wanted to be able to use meteor's modules with webpack using import {...} from 'meteor/...'.