GithubHelp home page GithubHelp logo

sharepoint / pnp-js-core Goto Github PK

View Code? Open in Web Editor NEW
381.0 80.0 233.0 8.06 MB

Code moved to https://github.com/pnp/pnpjs. This repository is archived.

License: Other

JavaScript 3.63% TypeScript 96.37%
pnp sharepoint sharepoint-patterns microsoft sp-pnp-js typescript fluent-interface rest javascript

pnp-js-core's People

Stargazers

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

Watchers

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

pnp-js-core's Issues

#77 - Tree shaking in samples

Webpack 2 and Rollup (and probably every other packaging solution) support tree shaking.

Here is a very concise description and examples. Rollup

Webpack is adding tree shaking to v2, It is the next big thing in packaging.

I wanted to open up for discussion making this a requirement of all of our samples. Since this is about Patterns and Practices. I think tree shaking should be a best practice for SharePoint Framework development from the beginning.

Our API is perfect for it. If someone just uses the lists object and users object which is possible. It would shake off probably a good 90% of our library. However since we would make this part of our recommended best practice and offer super easy to use boilerplate's with it built in; We would be shaking off chunks of every library they installed into the boilerplate as well.

Why is this important?

Mobile first! If our samples and boilerplate encourage this, we could have a significant impact on how well SP Framework apps run on mobile. Think 3G speeds.

@patrick-rodgers I just noticed on the rollup website one of the output module types they support is globals.

While we are on the subject, bundling is going to be a huge obstacle for people trying to learn this. We should start discussing ways to soften their landing into the world of gulp.

Allow per call overrides for the options set in the .setup function

Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your
needs please complete the below template to ensure we have the details to help. Thanks!

Category

[X] Enhancement

[ ] Bug

[ ] Question

Expected / Desired Behavior / Question

It's great to set options up front that are applied consistently, and many times it is perfect. But there are times, especially during development, where you want to pass specific values. For instance, odata=verbose in one call only. suggest you allow per call overrides to the .setup function.

I think this will become more and more important as the capabilities of the .setup function expand.

Gracefully fail gulp task when settings.js missing

Happy to pick this up, logging in order to prevent duplication of effort

  1. update the getting started guide to include a step for creating your settings.js for spsave
  2. Update gulpfile.js in order to gracefully fail and signpost users to the getting started for how to create the settings file.

@patrick-rodgers - let me know if you're happy for me to proceed - you may not want the gulpfile.js altering?

Quick Start Guide and settings.js

This is definitely a dumb one. When I follow the Quick Start Guide and run gulp serve, I get the following error:

module.js:341
throw err;
^

Error: Cannot find module './settings.js'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object. (D:\WebstormProjects\OfficeDev\PnP-JS-Core\gulpfile.js:26:16)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)

Looks like I need to create a settings.js file, probably from settings.example.js. There's nothing in the Quick Start Guide that describes that step, and there probably should be.

Alternative ways of exposing pnp to the end user (that doesn't break the end-user consumption of lib)

Design goal

First I would like to see if everyone is aware of the design goal of project of making sure that consumption should be done by including the library and then being able to start using it directly through the pnp object. I myself did not realise this was set in stone which led to some confusion in the discussions that followed.

Usage as shown in server-root/index.html

<script type="text/javascript">

       require(['scripts/pnp'], function(pnp) {        

           alert("our random string: " + pnp.util.getRandomString(5));         
       });
    </script>

This should be documented somewhere seeing as it's not going to be possible to change this signature after release.

Creating the pnp object

The problem is that the transpilation gives us an object where the code is accessible through pnp.defaults instead of pnp directly as the transpilation adds some metadata to the object exposed. (The replace below shows what I mean)

The current approach around this is to rewrite the transpiled code by adding the following to the package.js build task (line 84 and 102)

 .pipe(replace(/Object\.defineProperty\(exports, "__esModule", \{ value: true \}\);/ig, ""))
 .pipe(replace(/exports.default = PnP;/ig, "return PnP;"))

An alternative approach

I noticed that exposing the properties of the PnP class directly through export const sharepoint = new SharePoint(); would generate a pnp object that is consumable without rewriting the transpiled code with replace.

Two approaches that generate the same end-user result

Exporting a class and using .replace() to rewrite the source

export default class PnP {
    public static sharepoint = new SharePoint();
    public static sp = new Rest();
}

Exporting constants without the use of a class in pnp.ts and with no .replace()

export const sharepoint = new SharePoint();
export const sp = new Rest();

The above 2 examples will both generate an object that we can do pnp.web.lists on in the browser.

Lib output

The class example will generate this code in /lib

export default class PnP {
}
/**
 * Utility methods
 */
PnP.util = Util;
/**
 * The full SharePoint library
 */
PnP.sharepoint = new SharePoint();

The const example will generate this code in /lib

export const sharepoint = new SharePoint();
export const sp = new Rest();

More background

Related discussions that led to this issue can be found in #78 and #80.

Design pnp.sp.taxonomy

Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your
needs please complete the below template to ensure we have the details to help. Thanks!

Category

[x] Enhancement

[ ] Bug

[ ] Question

Expected / Desired Behavior / Question

If you are reporting an issue please describe the expected behavior. If you are suggesting an enhancement please
describe thoroughly the enhancement, how it can be achieved, and expected benefit. If you are asking a question, ask away!

Observed Behavior

If you are reporting an issue please describe the behavior you expected to occur when performing the action. If you are making a
suggestion or asking a question delete this section.

Steps to Reproduce

If you are reporting an issue please describe the steps to reproduce the bug in sufficient detail to allow testing. If you are making
a suggestion or asking a question delete this section.

Submission Guidelines

Delete this section after reading

  • All suggestions, questions and issues are welcome, please let us know what's on your mind.
  • If you have a general question, the Yammer Group or gitter may be a better forum.
  • Remember to include sufficient details and context.
  • If you have multiple suggestions, questions, or bugs please submit them in seperate issues so we can track resolution.

Thanks!

Utility methods, when is a util method warranted?

/**
 * Inserts the string s into the string target as the index specified by index
 * 
 * @param target The string into which we will insert s
 * @param index The location in target to insert s (zero based)
 * @param s The string to insert into target at position index
 */
export function stringInsert(target: string, index: number, s: string): string {
    if (index > 0) {
        return target.substring(0, index) + s + target.substring(index, target.length);
    }
    return s + target;
}

This reminds me of when the other PnP repo had the helper method to generate a SecureString. It was later removed due to not having the right "height".

/**
 * Adds a value to a date
 * 
 * @param date The date to which we will add units, done in local time
 * @param interval The name of the interval to add, one of: ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second']
 * @param units The amount to add to date of the given interval
 * 
 * http://stackoverflow.com/questions/1197928/how-to-add-30-minutes-to-a-javascript-date-object
 */
export function dateAdd(date: Date, interval: string, units: number): Date {
    let ret = new Date(date.toLocaleString()); // don't change original date
    switch (interval.toLowerCase()) {
        case "year": ret.setFullYear(ret.getFullYear() + units); break;
        case "quarter": ret.setMonth(ret.getMonth() + 3 * units); break;
        case "month": ret.setMonth(ret.getMonth() + units); break;
        case "week": ret.setDate(ret.getDate() + 7 * units); break;
        case "day": ret.setDate(ret.getDate() + units); break;
        case "hour": ret.setTime(ret.getTime() + units * 3600000); break;
        case "minute": ret.setTime(ret.getTime() + units * 60000); break;
        case "second": ret.setTime(ret.getTime() + units * 1000); break;
        default: ret = undefined; break;
    }
    return ret;
}

This is hard coded against an english locale. If a good library for handling dates is needed I would suggest handling it in in the application using the PnP library with something like moment.js vs us handling dates this way in the library itself.

I would argue that methods like this perhaps doesn't need to be in the actual pnp-js-core repo since all it's doing is providing a small abstraction for simple js. (Add to that list isFunction, stringIsNullOrEmpty)

Compare with

/**
 * Loads a stylesheet into the current page
 * 
 * @param path The url to the stylesheet
 * @param avoidCache If true a value will be appended as a query string to avoid browser caching issues
 */
export function loadStylesheet(path: string, avoidCache: boolean): void {
    if (avoidCache) {
        path += "?" + encodeURIComponent((new Date()).getTime().toString());
    }
    let head = document.getElementsByTagName("head");
    if (head.length > 1) {
        let e = document.createElement("link");
        head[0].appendChild(e);
        e.setAttribute("type", "text/css");
        e.setAttribute("rel", "stylesheet");
        e.setAttribute("href", path);
    }
}

This helps me as a dev by providing a single way of adding stylesheets. But should it be promoted to it's own class? DocumentStyleSheetInjector ?

(I'm also curios why getRandomString is not a test helper method)

Erros while using PnP-JS-Core Typescript files.

Category

Bug

Expected / Desired Behavior / Question

Should be able to resolve and compile the TypeScript definitions without complaining about duplicates

Observed Behavior

There are multiple "Duplicate identifier XXX" errors after adding the TypeScript error. on changing few settings, at times it complains about the "Cannot find name XXX" as well.

Steps to Reproduce

Steps to reproduce the issue

  • create a new SharePoint Add-In (SharePoint hosted) project
  • add a new module "node_modules" and get rid of the sample.txt file
  • open console and navigate to node_modules
  • run the npm command: npm install sp-pnp-js --save dev
  • you get the Duplicate error, screenshots attached

ts error screenshot

ISSUE: No $pnp or pnp global object when using in Visual Studio (not Visual Studio Code)

Update:

This may wider that just Visual Studio 2015... maybe issue with generated TypeScript definition file itself? It was reported on 4/28/2016 that the modern style of including the pnp.d.ts into a file doesn't work? Need people to help figure this out, repro and also come up with a solution asap for all of us to review!

Has anyone attempted to use our TypeScript definition "pnp.d.ts" in a Visual Studio 2015 Professional/Enterprise (with Update 2) project yet (project type doesn't matter)?

I know right know we are targeting Visual Studio Code for at least contributions and also end user usage, however, for those of us that are used to Visual Studio 2015 Professional/Enterprise, it would be really cool to get the TypeScript definition pnp.d.ts to work there too!

The actual problem I'm experience is that I'm having major issues trying to get intellisense to work from another .ts file in the same project.

The usual:
/// <reference path="pnp.d.ts" />
references correctly (path is correct), but the $pnp object doesn't even exist from an intellisense point of view

Also I tried some of the "newer" ways to reference
imports {$pnp} from "pnp"
and while I get the $pnp object, it has no members in intellisense. Admittedly I am a super newbie to this style of referencing so I could have the syntax completely wrong or it shouldn't even be referenced this way.

I tried to keep things simple in that I have the pnp.d.ts file in the same directory as the test.ts file.

On another note, I successfully referenced the pnp.js file from another JavaScript file using the
/// <reference path="pnp.js" />
syntax and the $pnp object exists and has full members present.

So, from a TypeScript point of view and Visual Studio 2015 Professional/Enterprise (with Update 2) project:

  1. Do I have the syntax wrong?
  2. Is something else wrong?
    (default Visual Studio project file TypeScript compilation settings?)
  3. Is it a legit issue with the TypeScript definition itself?

Would love to see if someone can repro this issue as well.

Thanks!

Samples/Documentation to be created?

Here is a list of documentation/sample topics that I feel would help if people visit our site they can use our library immediately (along with API documentation of course, which is being worked on here: #6).

Some or all of these maybe put in the wiki? Some may be in the sample project @patrick-rodgers demoed and/or both? A lot of these I envision screenshots as well as actual code.

  • How to use in Visual Studio Code
  • How to use in Visual Studio 2015
  • How to use in other tools (with NPM)
  • How to use in Content Editor Web Part (see note)
  • How to use in Script Editor Web Part (see note)
  • How to use in Provider Hosted SharePoint Add-In
  • How to use in SharePoint Hosted SharePoint Add-In
  • How to use in angularjs
  • How to use in React
  • Samples: how to get list items via REST (in TypeScript and JavaScript)
  • many many more...

note: need to figure out where site owners, who don't use editors like Visual Studio Code (because of company policies of installing software on the desktop), etc, can instead reference/download pnp.min.js from: a known CDN somewhere or somewhere in this repository (not link directly in that case, download first, then upload to a location of their choosing)?

Possible Tweaks to root readme.md

  • Make focus on end user coming to this site for first time and using it immediately all near the top of the readme
  • Add mission statement/make purpose of library clear
  • Add Links to new "How to use" and sample pages above as well as forthcoming generated api documentation

Appreciate more discussion/comments about what should be here...
As well as people taking these on asap as this library may start getting a lot of hits on 5/4/2016.

use $expand and $select with caml query

Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your
needs please complete the below template to ensure we have the details to help. Thanks!

Category

[x ] Enhancement

[ ] Bug

[ ] Question
I was looking to see how I could convert an existing projext to use this library.
In one of my queries I have this:

var url = this.getHostApiUrl("Web/Lists/GetByTitle('" + listTitle + "')/getitems?$expand=ContentType,Folder,Folder/ParentFolder,File,File/ParentFolder,RoleAssignments,RoleAssignments/RoleDefinitionBindings,RoleAssignments/Member,RoleAssignments/Member/Users,RoleAssignments/Member/Groups,RoleAssignments/Member/UserId");
var caml = "" +
" " +
"" +
" " +
" " +
" " +
folderServerRelativeUrl +
" " +
" " +
" " +
" " +

                " </View>";
        var queryPayload = {
            'query': {
                '__metadata': { 'type': 'SP.CamlQuery' },
                'ViewXml': caml
            }
        };
        var folderLoaded = $q.defer();

I'm passing in a Caml query and also using $expand and $select.
The current inplementation of getItemsByCamlQuery, makes the call to sharepoint imeediately and returns the deferrerd. No chance to update it with $select or $expand (which I have working in my local repo).I We could make it so that We can use a Caml query and also be able to use $select and $expand.

I think I would want to do code something like this:
$pnp.sp.web.lists.getByTitle('Style Library').caml(q).select('Title').expand('RoleAssignments').get()

LocaleID enumeration

Should we implement a LocaleID enumeration, based on the table here?

It's used in quite a number of place and I for one am forever having to keep coming back to that table during my working hours.

TSLint errors question

Hi,
I'm trying to build the solution and I keep getting errors during linting process.
Declaration of private instance member variable not allowed to appear after declaration of public instance member function.

few files only, but enough to ruin the build. Everything builds and test pass without linting.
Does anybody experience the same issue or it's just me?

Thanks in advance

Should the mock classes be refactored out of main library?

Should the mock classes

MockConfigurationProvider
MockLocation
MockStorage

not be a part of the final compiled pnp.d.ts, pnp.js and pnp.min.js?

Reasons:

  • end users wouldn't not really use these directly in a SharePoint Page as they are for unit testing only...
  • having them in the main pnp.js library adds additional bits and overhead to the library to not only download them to the browser, but also execute them at runtime (even when they are not used by the end user). Yes agreed it's tiny, but it all adds up especially on slow connections/mobile devices.
  • if end users really want to use these directly, perhaps they could be compiled into separate pnp.mocks.d.ts, pnp.mocks.js pnp.mocks.min.js libraries instead as it a very special use case (unit testing only)

Maybe too long term, but just thinking about keeping the main library as small as possible so it performs as fast as possible for end users.

Any thoughts?

Licensing information for distributed files

Category

[ x ] Enhancement

[ ] Bug

[ x ] Question

Question

/dist/pnp.js contains a very minimal copyright notice, and has the Microsoft (c) first

/**
 * sp-pnp-js v1.0.1 - A reusable JavaScript library targeting SharePoint client-side development.
 * Copyright (c) 2016 Microsoft
 * MIT
 */

quote from: https://www.gnu.org/licenses/license-list.en.html

...the MIT license, [..] is misleading, since MIT has used many licenses for software.

if you only download pnp.js and never look at the correct LICENSE file in the root it is unclear what the license grants. That's why I reacted so harsh, I only looked at pnp.js

Since pnp.js will be distributed and shared as a single file, users might never browse to GitHub

General consensus is each file (distributed as separate file) should include the whole license:
references:

Proposed change to built:

Bug in pnp.d.ts from npmjs.com/sp-pnp-js

Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your
needs please complete the below template to ensure we have the details to help. Thanks!

Category

[ ] Enhancement

[x] Bug

[ ] Question

Expected / Desired Behavior / Question

Compiling typescript using the pnp.d.ts definition file in npmjs.com/sp-pnp-js

Observed Behavior

Compile fails with the error: (3365,5): A 'declare' modifier cannot be used in an already ambient context.

Steps to Reproduce

Compile any typescript against this definition file.

Multiple libraries (for instance by extracting provisioning)?

I think we should extract the provisioning from the main "core library" seeing as it's around 25% of the total codebase right now.

My suggestion is that we move everything that is "core" into it's own folder and other "packages" into own folders.

For instance

/src/pnp - The core library
/src/provisioning - The provisioning framework, dependant on the core library

We would then package /src/pnp as pnp.js and /src/provisioning as provisioning.js.

Or: We remove provisioning and let it live as it's own repository that requires this library.

Unexpected token in JSON error

Category

Bug

Expected / Desired Behavior / Question

Display title of the current site.

Observed Behavior

SyntaxError: Unexpected token < in JSON at position 0 at ODataDefaultParser.ODataParserBase.parse

Steps to Reproduce

I am using the following code as I got from Wiki in a content editor web part on an on-premise version of SharePoint 2013.
$pnp.sp.web.select("Title").get() .then(function(data){ console.log(data.title); }) .catch(function(data){ console.log(data); });
I am getting the above error in the console when I run this. I've downloaded pnp.js and referred it in the HTML. I'm using Chrome. Any help?

Split types.ts

Should we split the interfaces in types.ts to own files?

Usage of type is now import * as Types from "./types"; will have to become import { Type } from "./types/type.ts";

Gulp Packaging

Need to create decide on and create a clean build/package process for the "dist" folder. This will be used potentially by various packages so need to address minification and module design.

loadStylesheet from utils not working

Category

[ ] Enhancement

[ X] Bug

[ ] Question

Expected / Desired Behavior / Question

Stylesheet should be added to "head"

Observed Behavior

Stylesheed not added to "head"

Steps to Reproduce

call pnp.utils.loadStylesheet('path_to_my_stylesheet', false);

The issue seems to come from this test:
if (head.length > 1)
should be either head.length > 0 or >= 1

utils/logging.ts - require() should be changed?

In working on the documentation generation, I noticed that in utils/logging.ts, there is a line near the top that is:
import Collections = require("../collections/Collections");

This one time occurrence is actually output in the pnp.d.ts TypeScript definition file.

Shouldn't that be changed instead to something like
import { Collections } from "../collections/Collections";
to use the es6 pattern that is used everywhere else in the codebase? That way code generation will go easier and perhaps reduce runtime dependency on requirejs (if that's what this is doing)?

Adher to TS doc naming conventions for interfaces? (styleguide?)

In http://www.typescriptlang.org/docs/handbook/writing-definition-files.html says:

In general, you shouldn’t prefix interfaces with I (e.g. IColor). Because the concept of an interface in TypeScript is much more broad than in C# or Java, the IFoo naming convention is not broadly useful.

What stances does this repo take? Is there a styleguide being worked on to declare things like naming conventions, recommended patterns etc etc?

Add code to avert 5000 list item limit

Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your
needs please complete the below template to ensure we have the details to help. Thanks!

Category

[x ] Enhancement

[ ] Bug

[ ] Question

We should implement something to overcome/avert the 5000 item limit imposed by sharepoint. Maybe get batches of 5000 in sub-reqauest, but don't resolve the final promise until we have them all.
see http://sympmarc.com/2016/05/24/dear-microsoft-remove-the-5000-item-limit-for-sharepoint-list-views/

Break gulpfile.js into separate files under a buildtasks sub directory

Patrick - Please assign me (alex-randall) this task as I am actively working on it and will have a pull request soon with it (1-2 days).

Background:
Gulpfile.js is starting to get large, but also anticipate much more growth in the future (such as for autogeneration of documentation).

Talked with Patrick about this offline.

I've already started work on breaking it apart and putting each task in a new "buildtasks" sub directory. I will prioritize this work as high priority (meaning pull request created in 1-2 days so that:

  • It can be reviewed/tested by others asap (I will test it extensively of course in Visual Studio Code/gulp)
  • After that, others can:
    • make other edits to the code to improve it, such as: (#41)
    • add new functionality to it, such as: (#6), which I am taking on for now

My wish list

Feature wish list from putting on my JavaScript/Office developer hat.

Disclaimer: This is just food for thought. I just rambled out some features "I" would love to use assuming infinite resources. A lot of these might be more appropriate to be a project built on top of this project or not at all.

Things I like in other projects

  • The project would have a snappy one liner or a mission statement easy to remember.
  • Supports Office/SharePoint 2013, 2016 on premises. All Office 365 APIs.
  • Doesn't bring any C# baggage.
  • Should be designed for modern JavaScript developers. Not c# people. <--- TypeScript is solving that problem already.
  • An API that feels simple, doesn't ask me for the same information repeatedly, etc.
  • Feels fun and productive whether I am trying to use it in TS -> ES6 -> ES5
  • Best in class support when writing code in VSCode, Visual Studio, WebStorm, Atom, etc.
  • Best in class support when bundling with Webpack, Browserify, SystemJS
  • Works great with Windows 10 UWP, Redux, React, React Native, Flux, JSX, Angular 1, Angular 2, Aurelia, and Electron.
  • Great "ready to start coding" boilerplates for TS and ES2015.
  • Inline code examples in the documentation

Things I want in my SP JS Dev life

  • Doesn't make REST easier. Makes Office/SharePoint development in TypeScript/JavaScript easier.
    • Handles etags, I just get an ItemUpdatedOnServer exception and let me specify how to handle it.
    • Abstracts stuff like _x0020_.
    • Never returns me crazy search api results like row[30].column[5] unless I requested them.
    • Always offers the raw results next to the pretty results.
    • Simplifies paging through large lists of users, items, and getting counts. Has example demonstrating.
    • Minimizes the developer having to pass GUIDs or having to lookup the value to a parameter in SharePoint.
    • If you give me back something that has a user/expandable property associated, expand it for me or make it simple. { expandoAutoExpand: true }
    • Makes authenticating easy. Whether it is school or org, domain, on premises, cloud, etc.
      • Most SP libraries punt this off to the developer!
      • IMO this is still a big barrier to entry in the current spdev (javascript) landscape.
    • It will only load the minimum code required to perform it's function. a.k.a. fast everywhere. Including dependencies. i.e. Rollup
  • Focus on great simple developer outcomes, not wrapping every api. Eventually wrap the entire API.
  • Stability is critical.
  • Sample projects for the popular libraries/frameworks. Maybe a Todo MVC on top of the SP task list?
  • Great getting started tutorial.
  • Great documentation that accepts contributions from the community.
  • Great readme with some of those video screenshots everyone is using showing off some of the best developer friendly features.
  • I would really love it if a library could do all of its heavy work with a queue of web workers (if supported in browser) for performance and freeing up the UI thread.
    • Speaking of heavy work, a library should assume that everyone that uses this library is using it against a large list/search index/user info table. It needs to scale.
  • Make the basics awesome, webs, lists, users, doc libs, files, etc.
    • SPServices is a great example of this. Many times I have seen end users with 3 - 5 line snippets of SPServices on the page. When business people are using your api, because it looks simple to them. That is epic.
  • Makes it easy to integrate via webpart for power users.
  • Makes custom forms in SharePoint easier.
  • Great offline support in Windows 10, Xamarin, browsers, etc.
    • IndexedDb, Sqlite, etc.

React and friends

In my opinion React, React Native, Redux/Flux, are going to continue to snowball and get even bigger. They make development easier. That is always a huge hit with developers.

  • React components with Material Design, Office Fabric, and/or WinJS baked in.
  • Make it dead simple to piece these react/web components together to make simple add-in apps for Office Suite, add-in parts for SharePoint, etc. Code like <PeoplePicker scope=site ... />. <---That looks sexy.

Documenation Generation

Looking to automate the creation of documentation pages for the core API. We will still need to author samples and examples. Research using JSDoc or similar to convert code comments into markdown pages.

Bower distribution

Create and document a bower distribution package. Need to work with core team as Microsoft needs to "own" the package

There is another module with an equal name when case is ignored

Category

[X ] Enhancement

[ ] Bug

[ ] Question

Expected / Desired Behavior / Question

Using webpack on OSX with Visual Studio Code, I am getting a lot of warning like:
WARNING in ./~/sp-pnp-js/lib/utils/Storage.js
There is another module with an equal name when case is ignored.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Rename module if multiple modules are expected or use equal casing if one module is expected.

WARNING in ./~/sp-pnp-js/lib/utils/storage.js
There is another module with an equal name when case is ignored.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Rename module if multiple modules are expected or use equal casing if one module is expected.

Submission Guidelines

It seems it is due to import in "d.ts" files using sometimes lowercase and sometimes uppercase.

Thanks!

fsevents needs OS X (darwin)

npm install is failing because of fsevents on Windows and Linux.

Steps to Reproduce

clone repo
npm install
Try on Windows/Linux

npm WARN notsup Not compatible with your operating system or architecture: [email protected]

I hope it will work on more OS if its ready.

Best regards!

Library unit testing against SharePoint (can we create a web, list, etc)

Need to begin working on development of a PnP PowerShell script to provision a test site, upload our test files, and then instructions to execute them.

Idea would be that you can execute a PowerShell script to create a dev site with required files (pnp.js, pnp.tests.js ??) and then instructions to execute those tests. This would allow us to have lists, items, files etc we can test against in a controlled and known way. Welcome thoughts on this.

Tracking issue for gulp-header bug

Category

  • Enhancement
  • Bug
  • Question

Observed Behavior

npm install fails with error about a missing file. Already fixed in #137

This is just a tracking issue so we can go back to installing the latest gulp-header after this PR is merged and a later version is added to NPM.

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.