Giter Club home page Giter Club logo

vscode-cdnjs's Introduction

cdnjs.com extension for Visual Studio Code

Search for and embed libraries from cdnjs.com into your HTML using Visual Studio Code commands.

Searching cdnjs.com for jquery

This extension uses the cdnjs.com API to search for libraries that are hosted on cdnjs.com. You choose whatever version of the library you wish and then insert library urls directly into your HTML, copy them to your clipboard or open them in your browser.


Features

  • Search for any published version of any library hosted on cdnjs.com
  • Embed those library's file urls directly into your documents
  • Insert those library file contents into the current document or a new document
  • Insert urls, <script> and <link> tags into your HTML for JS and CSS files
  • Copy urls, <script> and <link> tags to your system clipboard
  • Open any file url in your browser
  • Choose from a list of your most recently used libraries
  • Includes Subresource Integrity and Crossorigin attributes in <script> and <link> tags

Recent Libraries

  • Keeps track of your most recently used libraries for you to quickly choose from

Recent Libraries list


Built-in, automatic, persistent caching

  • Caches your cdnjs.com search results and library data
  • Cache is persistent between Visual Studio Code sessions
  • User configurable expiration time (default: 6 hours)
  • Cache can be cleared at any time using a command

Visual Studio Code Commands

cdnjs: Search for libraries

  • Perform a search for libraries on cdnjs.com

cdnjs: Recent libraries

  • View a list of your most recently used libraries for you to quickly access

cdnjs: Clear cache

  • Empty/clear/flush the cache

Settings


cdnjs.quoteStyle

  • Quote style for HTML tags. Possible values are single or double
  • Default: single

cdnjs.protcol

  • Protocol for urls in HTML tags. Possible values are https://, http:// or //
  • Default: https://

cdnjs.maxRecentLibraries

  • The maxmium number of Recent Libraries to save
  • Default: 10

cdnjs.cacheTime

  • The length of time (in seconds) to cache library and search results
  • Default: 21600 (6 hours)

cdnjs.integrity

  • Include integrity attribute (SRI) in script and link tags
  • Default: true

cdnjs.crossorigin

  • Include crossorigin attribute in script and link tags
  • Default: true

This extension will obey VSCode's http.proxyStrictSSL setting when making SSL-enabled API calls to cdnjs.com.


Disclaimer: This extension is not affiliated with cdnjs.com in any way. It simply utilizes the publically available cdnjs.com API order to search for and fetch libraries from cdnjs.com. All cdnjs.com imagery is property of it's respective owners.

vscode-cdnjs's People

Contributors

dependabot[bot] avatar jakobud avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

vscode-cdnjs's Issues

Ignoring strict SSL setting

Just installed this in VS Code 1.8.1

When I go to search libraries and hit enter to confirm the search nothing pulls up.

I have changed the search parameters to http vs https and no change.

command 'cdnjs.search' not found

When I try to use the plugin, I just get this error.

Using Ubuntu 16.04.

VSCode Info:
Version 1.10.1
Shell 1.4.6
Renderer 53.0.2785.143
Node 6.5.0

Installation on ubuntu

On
Visual Code Version 1.17.0
Ubuntu 16.04.2 LTS

Installing cdnjs extension via marketplace, refreshing restarting.
Cant access the cdn command with CTRL+space.
Sees the cdnjs settings in my Preferences->settings page but not much I can change there?

If it might interfere this is my overided settings:

// Place your settings in this file to overwrite the default settings
{
    "git.enableSmartCommit": true,
    "git.confirmSync": false,
    "window.zoomLevel": 1,
    "emmet.includeLanguages": {
        "blade": "html"
    },
    "emmet.triggerExpansionOnTab": true
}

Thanks, looking forward to using this.

command 'cdnjs.search' not found

Yesterday in my pc with windows it was working properly but I've just installed VSCode on Linux and Installed it when I run any command it says

Error "command 'cdnjs.search' not found"
Error "command 'cdnjs.recentLibraries' not found"
Error "command 'cdnjs.clearCache' not found"

I thought that may a library was missing so I installed the library cdnjs from npm grobally "sudo npm i -g cdnjs" but it still not working.

Copy the raw code and paste it into the active document

This plugin is brilliant. However, it would be great if there's an option to copy the raw code and insert it into the document.

Sometimes, for smaller projects, it's efficient to simply paste the code at the end of the JS file. So I would request this plugin to do either or both of these options:

  1. Code: Insert into document
  2. Code: Copy to clipboard

Thank you!

How it work?

Checklist

  • Install extension: check
  • open .html file: check

Usage

  • Ctrl + P
  • "cdnjs"
  • ???????? "jquery" ..... (blank) ....
  • (click inside head element)
  • "cdnjs" .... (nothing)...

????????????????????????????????????????????

Only current version

I've installed the vscode extension and it only shows the current version of the library I'm looking for. Is there a way to change this setting?

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.