GithubHelp home page GithubHelp logo

smile2014 / salesforce-angular2-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from watzon/salesforce-angular2-boilerplate

0.0 2.0 0.0 176 KB

Boilerplate for building an Angular 2 application on the Salesforce platform. Includes the ability to develop locally using the Salesforce REST API

License: MIT License

JavaScript 25.07% TypeScript 57.84% HTML 13.72% CSS 0.97% Apex 2.40%

salesforce-angular2-boilerplate's Introduction

The Easier Way to Combine Salesforce and Angular 2

This boilerplate, which is still largely unifinished, combines the powers of Gulp, JSForce, Angular 2, and Salesforce and allows you to develop and test your Salesforce applications completely locally. Deploying is as easy as running gulp or you can be more specific and just gulp deploy:classes.

Getting set up

Setting up is super easy. First clone or fork this repository to your local machine with git clone https://github.com/iDev0urer/salesforce-angular2-boilerplate.git or, if you forked the repo, do git clone YOUR-REPO-URL. Then go to the salesforce-angular2-boilerplate directory with cd salesforce-angular2-boilerplate.

You will need NodeJs in order to work with this so make sure you have that installed.

Once you're in the salesforce-angular2-boilerplate directory run npm install. This project also uses gulp 4, so install that:

npm rm -g gulp
npm install -g gulp-cli

If everything worked gulp -v should give you a version number over 4.

You will also need to copy the config.sample.js file to config.js and fill out the pertenent information. It should look like this:

module.exports = {
    deploy: {
        username:       '[email protected]',
        password:       'YourPasswordAndPossiblySecurityToken',
        login_url:      'https://login.salesforce.com',
        api_version:    36.0,
        timeout:        120000,
        poll_interval:  5000,
    },

    visualforce: {
        template: 'index.page.html',
        page: 'AngularApp',
        controller: 'AngularAppController'
    },

    resources: {
        app_resource_name: 'AngularApp',
        node_module_resource_name: 'NodeModules',
    },

    options: {
        
    }
}

Running the example

This boilerplate comes with a working example of a contact management application. To get it running just run the gulp command while in the salesforce-angular2-boilerplate directory. It will open a local server at http://localhost:8080 where you should be able to view the working application. When you're ready to deploy the application and test it in Salesforce just run gulp deploy and wait for the application to finish deploying.

Contributing

If you find something wrong or come up with a better way to do things please fork and pull request. I check Github several times daily and love seeing that little notification bubble.

Known Issues

So far things seem to be working well for the most part. Some things that I have noticed are:

  • Visualforce Remoting and WebServices use different date formats. I have tried to compensate for those differences in the Salesforce service with the parseSoapResult and convertDate methods, but I may have missed an edge case.

License

The MIT License

Copyright (c) 2010-2016 Chris Watson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Changelog

[0.6.1] - 2016-09-01
  • Added Gravatar directive to get use pictures rather than pulling them from Salesforce
[0.6.0] - 2016-09-01
[0.5.0] - 2016-09-01
  • Restructured config files. Now using config.js rather than yaml
  • Took the pxml.js file which is used for package.xml generation and refactored it out into it's own module
  • Refactored gulpfiles to fit with new config
[0.4.3] - 2016-08-30
  • Fixed bug with ngZone causing execute method to fire twice when within ngOnInit
[0.4.2] - 2016-08-30
  • Removed https requirement from local server. Use http://localhost:8080 now
  • Added components to app.module.ts declarations
  • Made changes to forked version of jsforce and updated salesforce.service.ts to reflect those changes.
[0.3.0] - 2016-08-27
  • Added SOQL class to build SOQL queries
[0.2.0] - 2016-08-27
  • Refactored some methods in the Salesforce service
  • Finished the ContactComponent (for now)
  • Added a CreateContactComponent
  • Fixed some bugs
[0.1.0] - 2016-08-23
  • Added this repo to github

salesforce-angular2-boilerplate's People

Watchers

James Cloos avatar YONE avatar

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.